- Install PostgreSQL.
- Install NodeJS.
- Clone this repository (e.g. enter
git clone https://github.com/Happytreat/dynalite.git
in your command-line terminal). - Change directory to the newly created dynalite directory by entering
cd dynalite
.
- Change directory to the src folder by entering the command
cd frontend
. - Install the required packages by entering
npm install
. - Create a file named .env in the current directory (refer to .env.backup).
- Open .env and enter the following:
REACT_APP_API_URL=<backend-url-root>/occupancy
PUBLIC_URL=<frontend-url>
- Replace the fields in
< >
accordingly. - You can omit
PUBLIC_URL
and the front-end app will uselocalhost
accordingly.
Example:
REACT_APP_API_URL=https://www.evantay.com/tech/dynalite-api/occupancy
- Run this project on your local server by using
npm start
. - Stop the server by using
CTRL + C
.
To test Dynalite front-end without your own Raspberry Pi or back-end server, use the example REACT_APP_API_URL
given above.