From dd83f495caff321120b23258c3fb0907483e4b12 Mon Sep 17 00:00:00 2001 From: lee-soo-heon Date: Thu, 19 Sep 2019 16:50:27 +0900 Subject: [PATCH] run --- Dockerfile | 4 +++- run.sh | 2 +- src/router.js | 54 +++++++++++++++++++++++++++++++-------------------- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index dde0905..ddaf4fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ -FROM webratio/nodejs-http-server +FROM mhart/alpine-node:5.7.1 + VOLUME /tmp +RUN npm install -g spa-http-server ADD dist /opt/www ADD run.sh /opt/run.sh ARG VUE_APP_API_HOST diff --git a/run.sh b/run.sh index 52227d8..f4d0572 100644 --- a/run.sh +++ b/run.sh @@ -1,2 +1,2 @@ env > /opt/www/static/env.txt -http-server /opt/www -p 8080 \ No newline at end of file +http-server /opt/www -p 8080 --push-state \ No newline at end of file diff --git a/src/router.js b/src/router.js index 1af075c..96b200d 100644 --- a/src/router.js +++ b/src/router.js @@ -18,32 +18,44 @@ export default new Router({ path: '/', name: 'home', component: Home, - }, - { - path: '/mypage', - name: 'mypage', - component: MyPage - }, - { - path: '/products', - name: 'products', - component: ProductPage, - }, - { - path: '/orderfinish', - name: 'orderfinish', - component: OrderFinish, - }, - { - path: '/survey', - name: 'survey', - component: Survey, + children: [ + { path: 'mypage', component: MyPage }, + { path: 'orderfinish', component: OrderFinish }, + { path: 'survey', component: Survey }, + { path: 'products', component: ProductPage }, + + ] }, { path: '/products/:name', name: 'productsDetail', component: ProductDetail, - } + }, + // { + // path: '/mypage', + // name: 'mypage', + // component: MyPage + // }, + // { + // path: '/products', + // name: 'products', + // component: ProductPage, + // }, + // { + // path: '/orderfinish', + // name: 'orderfinish', + // component: OrderFinish, + // }, + // { + // path: '/survey', + // name: 'survey', + // component: Survey, + // }, + // { + // path: '/products/:name', + // name: 'productsDetail', + // component: ProductDetail, + // } ] })