Skip to content

Commit

Permalink
简单修改
Browse files Browse the repository at this point in the history
  • Loading branch information
harsima committed Apr 5, 2018
1 parent 9cfda47 commit cb9b38a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,25 @@ npm run build --report
├── ...
```

## Nginx简单部署配置
```
...
# 以上保持默认配置即可
server {
listen 9090;
server_name localhost;
# 项目文件目录
root html/vue-backend;
index index.html index.htm;
location / {
# vue-router使用history模式下的必须配置
try_files $uri $uri/ /index.html;
index index.html;
}
}
```

## 其他
欢迎反馈及探讨各种问题,同时请注意issue规则
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
assetsPublicPath: '/',
productionSourceMap: false,
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
Expand Down
6 changes: 3 additions & 3 deletions src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import store from '../store'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { Message } from 'element-ui'
import Auth from '@/util/auth'
import store from '../store'
import staticRoute from './staticRoute'
import { asyncLayout, asyncRoute, redirectRoute} from './asyncRoute'
import whiteList from './whiteList'
import Auth from '@/util/auth'
import { Message } from 'element-ui'

NProgress.configure({ showSpinner: false });

Expand Down

0 comments on commit cb9b38a

Please sign in to comment.