Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.23 KB

README.md

File metadata and controls

52 lines (39 loc) · 1.23 KB

如何启动工程

后台启动

前台启动

文件服务器前台 基于Vue的项目,默认已经配置好了公用后台地址,可以直接启动访问。

安装依赖

npm install

注意:如果 npm 使用 taobao 源或者 cnpm 下载可能会出现找不到模块的报错,请使用 npm 官方源下载

开发

npm run serve

See Configuration Reference.

如何修改后台地址

修改 vue.config.js 需要添加代理:

devServer: {
    proxy: {
          '/api/admin': {
                target: 'http://localhost:8888/fileserver',
                pathRewrite: {
                    '/api/admin': '',
                },
                cookiePathRewrite: {
                  '/fileserver/': '/api',
                },
          },
          '/api/file': {
                target: 'http://localhost:8888/fileserver',
                pathRewrite: {
                    '/api/file': '',
                },
          },
    }
}

重新启动即可