Client includes all front end content & Server includes all backend component. Please make sure your environment variables are correct & available.
Libraries that have been used
Client(FrontEnd) | Server(BackEnd) |
---|---|
Axios | mongoose |
moment | express |
react-icons | concurrently |
cors | dotenv |
antd | jsonwebtoken |
tailwind | bcrypt |
react-hot-toast | morgan |
redux | nodemon |
webvitals | validator |
-
Clone the repository to local
-
If you are working in VS code, split the terminal (hopefully you are in the working directory). If you are working with terminal(mac) or cmd(windows), you will have to run the next steps individually in the respective folders. (just work in VS code, life is much simpler ๐ผ)
-
Change directory to client and run
npm i
ornpm install
(This will install all dependencies marked in the package.json) -
Change directory to server and run
npm i
ornpm install
(This will install all dependencies marked in the package.json) -
In Client, run
npm start
-
In Server, create environment variables in
.env
You should take make sure have three environment variables
- MONGO_URI (Use connect from MongoDB Atlas to get the URL and don't forget to include password)
- PORT (use like 8080 or any other)
- SECRET_KEY (This will be used for signature in JWT)
-
In Server, run
npm run server
-
Alternatively you can run command
npm run dev
in server to run client and server concurrently. -
Also make sure the proxy in client matches the port for server. (Very important)
-
Enjoy the App. ๐ฝ
P.S. Take care of tailwind by reading the docs at their official website
- If your proxy is not able to connect to backend server, you should delete the
package-lock.json
andnode_modules
in client and runnpm i
ornpm install
again. Before doing this, kill all the terminals and reset everything. This issue seems to be because of cache.
Please fork and create PR for contribution.