Project Setup

Setting Up the Project

The front-end code is built using ReactJS. To set it up locally:

  1. Clone the code repository from GitHub
  2. Navigate to the front-end folder
  3. Run npm install to install dependencies
  4. Run npm start to start the dev server

Environment Variables

The front-end interacts with the backend API whose URLs need to be configured.

Create a .env file and add:

REACT_APP_API_URL=http\://localhost:5000 (local)
REACT_APP_API_URL=<https://api.enatega.com> (production)

Building for Production

Run npm run build

This will generate a build folder with minified production code

Deployment Options

There are multiple options to deploy the production build:

Option 1: Serve files from web server

Copy build folder contents to server's document root (htdocs, public etc).

Option 2: GitHub Pages

Configure a GitHub project page and publish build folder.

Option 3: Netlify

Connect Netlify to GitHub repo. On each commit, it will rebuild and deploy.

Option 4: Cloud Providers

Deploy build to services like AWS S3, Google Cloud, Azure Blob Storage and configure custom domain.