1初始化项目
2下载插件
html-test>npm i http_server -s
3启动项目
html-test>http-server -p 8001
4nginx 代理配置
配置文件
配置命令
location / {
proxy_pass http://localhost:8001;
}
location /api {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
}
启动
nginx