|
há 4 anos atrás | |
---|---|---|
build | há 4 anos atrás | |
config | há 4 anos atrás | |
src | há 4 anos atrás | |
static | há 4 anos atrás | |
test | há 4 anos atrás | |
.babelrc | há 4 anos atrás | |
.editorconfig | há 4 anos atrás | |
.eslintignore | há 4 anos atrás | |
.eslintrc.js | há 4 anos atrás | |
.gitignore | há 4 anos atrás | |
.postcssrc.js | há 4 anos atrás | |
LICENSE | há 4 anos atrás | |
README.md | há 4 anos atrás | |
gulpfile.js | há 4 anos atrás | |
index.html | há 4 anos atrás | |
package.json | há 4 anos atrás |
npm install
npm run dev
location / {
proxy_pass http://127.0.0.1:7000;
} location /api/admin/ {
proxy_pass http://localhost:8001/;
}
#static/config/index.js
各工程的context-path也配置到了nginx上,本地访问需要跟nginx同步,本地拆成两部分, 在这个配置文件上配置前一半,http://127.0.0.1:8001/api/,context-path写到文件具体的rest请求上, 例如/sys/login,合起来就是http://127.0.0.1:8001/api/sys/login, 在转发的过程中,nginx已经转发到http://localhost:9001/api/sys, 所以在实际的rest工程里,springboot的request-mapping只需要配置/login,这样是为了以后好扩展Rest工程