代码拉取完成,页面将自动刷新
This is the web project for N9E
The built pub folder can work in the n9e.
you can deploy the front-end code independently, just replace the pub with the new release.
node: v16.x <= v16.15.0
npm: 8.x <= 8.5.5
npm install
npm run dev
The back-end api proxy config is https://github.com/n9e/fe/blob/main/vite.config.ts#L49
npm run build
server {
listen 8765;
server_name _;
add_header Access-Control-Allow-Origin *;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
root front-end/page/path; # e.g. /root/n9e/pub;
location / {
root front-end/page/path; # e.g. /root/n9e/pub;
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://n9e.api.server; # e.g. 127.0.0.1:18000
}
}
vite.config.js
and tsconfig.json
should both configure to make sure alias works"css.validate": false
in vscode setting.json to ignore the css warning此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。