For Client (or Frontend), just run
npm install --dir client
For Server (or Backend), just run
npm install --dir server
Once the dependencies are installed:
For Frontend, just run:
npm run --dir client start
For Backend, just run:
npm run --dir server dev
Each Project has their own specific environment variables, just go to their specific directory and add .env
(dot env) file or copy the .env.example
file and edit their values.
For the Backend:
ENV VARIABLE | DESCRIPTION | TYPE | REQUIRED | DEFAULT VALUE |
---|---|---|---|---|
DB_CONNECTION |
For Mongo DB, usually the host | string |
NO | mongodb://localhost:27017 |
DB_NAME |
For Mongo DB, the database name | string |
NO | Geo |
PORT |
The Port of the Server | number |
NO | 5000 |
TOKEN_EXPIRES_IN |
When will the Token expires, expressed in seconds or a string describing a time span zeit/ms. | string | number |
YES | N/A |
TOKEN_SECRET |
The Token Secret for JWT | string |
YES | N/A |
For the Frontend:
ENV VARIABLE | DESCRIPTION | TYPE | REQUIRED | DEFAULT VALUE |
---|---|---|---|---|
REACT_APP_BASE_URL |
The Backend URL | string |
NO | http://localhost:5000 |
See documentation about Environment variables for Vite