To use this template, you must follow the steps below:
- Clone the repository
- Install dependencies using npm
- First do
npm install
in the root directory - Then do
npm install
in theclient
directory
- First do
- To only run the backend server, run
npm start
in the root directory
- To only run the frontend server, run
npm run start
in theclient
directory
- To run both servers, run
npm run dev
in the root directory
You need to do the steps below to get the project up and running:
- Create a MongoDB Atlas account
- Create a MongoDB database
- Copy the
mongodb://<username>:<password>@<host>:<port>/<database>
string - Create a config folder in the root directory
- Create a
default.json
file in the config folder- In that file create a JSON object with the following property:
mongoURI
: The URL to your MongoDB database
- In that file create a JSON object with the following property:
- Create a
db.js
file in the root directory- In that file create a function that returns a MongoDB connection
- If you want to know how to create a MongoDB connection then check out the MongoDB connection documentation