Giter Site home page Giter Site logo

fe's Introduction

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

fe's People

Contributors

1146612734 avatar arika163 avatar foursevenlove avatar gracewalk avatar guguji5 avatar jsers avatar kangkeizai avatar laiwei avatar masterjyq avatar muyingjie avatar single-spa-bot avatar springrain avatar star-6 avatar sunnyboy-wyh avatar tripitakav avatar wangtianyu456 avatar yansuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.