Download MongoDB v5.0.4 Download Node.js v16.13.0
Install MongoDB Install Node.js
To run the database
MongoDB must be installed on the computer
MongoDB by default stores databases in the directory where it is installed.
So the following directory needs to be created
Following will do that:
by default MongoDB database runs on port 27017 http://localhost:27017
To run the database manually Type the following in the cd after adding mongo bin files to the PATH
Then type
To check the port where MongoDB is running, just in case
To run the backend
Use the following to install node dependencies:
Type the following to run the server:
[server.js] contains the way that creates the back-end server on port 8000 [http://localhost:8000]
To start the front-end
Use the following to install node dependencies:
Type the following to run the client in development mode:
Open http://localhost:3000 to view it in the browser.
For simplicity refer to package.json
in both server and client folders and check under "dependencies"
Server, Client and Database are separate processes and they all need to run for the website to work the way it is intended to work. In this case they need to run on the single computer, as they are all using localhost
First run the database, Second run the server, Finally run the client.