Skip to content

n9e/fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f908daf · Feb 27, 2025
Nov 19, 2021
Nov 10, 2021
Nov 20, 2024
Feb 17, 2025
Jan 2, 2025
Feb 27, 2025
Oct 10, 2024
Apr 6, 2022
Aug 12, 2021
Nov 12, 2021
Mar 7, 2022
Dec 8, 2023
Nov 11, 2022
Oct 28, 2022
Dec 20, 2024
Feb 14, 2025
Feb 14, 2025
Nov 4, 2023
Nov 4, 2023
May 23, 2023
Dec 26, 2024

Repository files navigation

n9e-fe

This is the web project for N9E

Usage

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.

Dependencies

node: v16.x <= v16.15.0
npm: 8.x <= 8.5.5

Installation

npm install

Start

npm run dev

The back-end api proxy config is https://github.com/n9e/fe/blob/main/vite.config.ts#L41

Trouble shooting: https://answer.flashcat.cloud/questions/10010000000003759

Build

npm run build

Nginx Server

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
    }
}

Notice

  • vite.config.js and tsconfig.json should both configure to make sure alias works
  • Add "css.validate": false in vscode setting.json to ignore the css warning
  • Install the Prettier plugin in vscode and set the format on save