Skip to content

Julie0000/gratt-demo-frontend

Repository files navigation


Projects

ABDRB02 DSA bom-sync 廠內採購報交系統

My Skills

Requirements

  • node 20.17.0

Installation

  1. Clone the repo

  2. Install npm packages

    1. In project directory & proxy-server directory
      npm install
    2. In server directory (if express server needed)
      npm install
  3. Create .env,.env.development,.env.production file and set value

    REACT_APP_SERVER=      # 8000 port
    REACT_APP_DOMAIN=
    
    REACT_APP_DOMAIN=
    

Running the App Locally

You can run the app locally using one of the following methods. The app will be available at http://localhost:3000 & your IP

  1. In project directory
        npm start
  2. In proxy-server directory and start the proxy server(Starting Proxy at localhost:8000):
        node app.js

Running the App dev mode with express

  1. In project directory,and move the build file in server file
        npm run build
  2. In server directory and start the express server(Starting at localhost:5000):
        node server.js

Build the App

  1. Update version in package.json
  2. In project directory
        npm run build:prod
  3. deploy in google cloud
  4. release stable version in github

Generate data schema from swaggerUI in file src/api/data-contracts.ts

  1. scripts/generate-api.mjs ,can be adjusted as needed
  2. In project directory
        npm run generate:api

Tests with Jest (unit)

  1. Test
        npx jest
  2. Clear Cache
        npx jest --clearCache
  3. directory
  • __mocks__
  • __test__
  1. generate test coverage index.html in coverage/lcov-report
       npx jest --coverage

Documents


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published