From f298fc6eb39553ed14080694b6f22c83ff49c057 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 27 Mar 2018 14:13:12 +0900 Subject: Bye bye subdomains --- src/web/app/dev/script.ts | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/web/app/dev/script.ts') diff --git a/src/web/app/dev/script.ts b/src/web/app/dev/script.ts index 2f4a16fab1..c043813b40 100644 --- a/src/web/app/dev/script.ts +++ b/src/web/app/dev/script.ts @@ -3,6 +3,7 @@ */ import Vue from 'vue'; +import VueRouter from 'vue-router'; import BootstrapVue from 'bootstrap-vue'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap-vue/dist/bootstrap-vue.css'; @@ -26,14 +27,18 @@ Vue.component('mk-ui', ui); * init */ init(launch => { + // Init router + const router = new VueRouter({ + mode: 'history', + base: '/dev/', + routes: [ + { path: '/', component: Index }, + { path: '/apps', component: Apps }, + { path: '/app/new', component: AppNew }, + { path: '/app/:id', component: App }, + ] + }); + // Launch the app - const [app] = launch(); - - // Routing - app.$router.addRoutes([ - { path: '/', component: Index }, - { path: '/apps', component: Apps }, - { path: '/app/new', component: AppNew }, - { path: '/app/:id', component: App }, - ]); + launch(router); }); -- cgit v1.2.3-freya