Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.34 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.34 KB

sbs-frontend

Built with React.js 18.2.0

Project setup

  1. Create a .env file and add the following:

    NNODE_ENV=<ENV>
    API_URL=<API_BASE_URL>
    

    where:

    • NODE_ENV = development or production
    • API_URL = http://localhost:5000/api/v1
  2. Install dependencies: npm install

  3. Run application: npm run start

Build application

Command: npm run build

Docker command: docker build -t <IMAGE>:<TAG> .

Note: Follow semantic versioning scheme X.Y.Z for image <TAG>.

Run application

Command: npm run start:prod

Docker command: docker run --name=<CONTAINER_NAME> [-e <ENV_VAR_NAME>=<ENV_VAR_VALUE>] [-v <HOST_PATH>:<CONTAINER_PATH>] -dp <HOST_PORT>:<CONTAINER_PORT> <IMAGE>:<TAG>

Note: Provide environment variables and mount required files using -e and -v options. Refer: docker run | Docker Docs

Requirements