theianchia / pass-booking-application-frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


IS442 G1T1 Frontend

Table of Contents
  1. About The Project
  2. Prerequisites
  3. Installation and Set-Up
  4. Production Mode
  5. Development Mode

About The Project

Frontend element for Singapore Sports School's Corporate Pass Application. Built in React and depends on its accompanying REST API.

(back to top)

Prerequisites

  • Recommended platform
    • Development: macOS Monterey (Intel)
    • Production: Linux (Ubuntu 16.04)
  • Nodejs 14.x, 16.x, 18.x (v18.9.1 preferred)
    • Accompanying npm (v8.19.2 preferred)

Installation and Set-up

This application can be run in both development and production modes

Set-up Local Directories

Clone this repository or download to files to local directory. Open a terminal session and navigate to this application root (.../wanderlust)

cd /path/to/wanderlust

Provide Environment Variables

This frontend application relies on the accompanying backend server for computation logic and data. We need to provide it the following information. Edit the backend server URL in .env.example using any text editor (vi .env.example).

  1. Replace <> fields with the respective information
  2. Rename .env.example to .env

Note: .env is automatically ignored by git`

REACT_APP_EMAIL_CHECKING acts as a feature flag to verify that the email has a valid Singapore Sports School subdomain. It is set to false by default for development.

Install Dependencies

npm install

Production Mode

  1. Create a production build
npm run build
  1. Install serve
npm install -g serve
  1. Run the production build
serve -s build

Development Mode

Run the application in development mode

npm run start

About

License:MIT License


Languages

Language:JavaScript 98.5%Language:HTML 0.8%Language:CSS 0.6%Language:Shell 0.0%