Separate client and server codes. Keep everything in one git repo for simplicity
[vchess.git] / client / src / main.js
CommitLineData
625022fd
BA
1import Vue from "vue";
2import App from "./App.vue";
3import router from "./router";
4import { ajax } from "./utils/ajax";
5
6Vue.config.productionTip = false;
7
8new Vue({
9 router,
10 render: function(h) {
11 return h(App);
12 },
13 created: function() {
14 //alert("test");
15 ajax("http://localhost:3000/variants", "GET", variantArray => {
16 console.log("Got variants:");
17 console.log(variantArray);
18 });
19 },
20}).$mount("#app");
21
22// TODO: get rules, dynamic import
23// Load a rules page (AJAX)
24// router.get("/rules/:vname([a-zA-Z0-9]+)", access.ajax, (req,res) => {
25// const lang = selectLanguage(req, res);
26// res.render("rules/" + req.params["vname"] + "/" + lang);
27// });