For Client (or Frontend), just run
npm cd client
npm install
For Server (or Backend), just run
npm cd server
npm install
Once the dependencies are installed:
For Frontend, just run:
cd client
npm run start
For Backend, just run:
cd server
npm run 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, usual database | string |
NO | mongodb://localhost:27017 |
DB_NAME |
For Mongo DB, the database | string |
YES | Any |
PORT |
The Port of the | number |
NO | 5000 |
TOKEN_EXPIRES_IN |
When will the Token expires | string | number |
YES | N/A |
TOKEN_SECRET |
The Token Secret for | string |
YES | N/A |
Note: for DB_CONNECTION it is better to configure and connect your own Mongo Db with user credentials
For the Frontend:
ENV VARIABLE | DESCRIPTION | TYPE | REQUIRED | DEFAULT VALUE |
---|---|---|---|---|
This is make your code consistent by using ESLint.
Before you commit your changes, just make sure to run the linter first
Just run run:
pnpm run --dir (client|server) lint
If you wanted to fix automatically, just run:
pnpm run --dir (client|server) lint:fix
Make sure to change the value of --dir
flag