|
|
hai 18 horas | |
|---|---|---|
| public | hai 1 mes | |
| src | hai 18 horas | |
| .browserslistrc | hai 1 mes | |
| .editorconfig | hai 1 mes | |
| .env.development | hai 1 mes | |
| .env.production | hai 1 mes | |
| .eslintrc.js | hai 1 mes | |
| .gitignore | hai 1 mes | |
| Dockerfile | hai 1 mes | |
| README.md | hai 1 mes | |
| babel.config.js | hai 1 mes | |
| build.sh | hai 1 mes | |
| package.json | hai 1 mes | |
| vue.config.js | hai 1 mes |
.env.development 和 .env.production 环境文件中分别配置开发环境和生产环境的后端接口
npm --registry http://registry.npm.taobao.org i
npm run serve
启动服务后打开浏览器,访问 http://localhost:8000
npm run build
使用 .env.production 文件中的配置
构建后生成的结果在 dist 目录中
server {
listen 8080;
access_log off;
root /opt/webroot;
location / {
try_files $uri $uri/ /index.html;
}
}
root 指令的路径指向 dist 目录的绝对路径