Follow the given steps to set up the project:
- create a .env.local in config in server
cd server
mkdir config
cd config
touch .env.local
- In .env.local, add 2 variables named
JWT_SECRET
(enter a string of your choice) andMONGOOSE_URL
and add your MongoDB connection string here. - while in server, install all dependencies using
npm i
- Your backend is now ready, to set up the frontend, navigate to client and create a file named ```.env````
cd client
touch .env
- in .env, create a variable named
VITE_BASE_URL
and set it's value ashttp://localhost:3000
- Back in client, execute
npm i
to install all dependencies - Execute
npm run dev
in client to start the frontend - Execute
tsc
in server to compile all the typescript files - Then execute
node dist/
in server to start the backend - You are now ready to go!