This is a simple backend built using Node.js and Express.js. Purpose is to teach the method of connecting MongoDB to a backend.
- Clone repo
- Create MongoDB account and database cluster
- Get connection string which should look like
mongodb+srv://[USERNAME]:[PASSWORD]@cluster0.plteu.mongodb.net/[DATABASE_NAME]?retryWrites=true&w=majority
- Put it into a
.env
file with formatMONGODB_CONNECT=
connection string - Run
npm install
- Run
npm start
- Use a REST client to make requests to
localhost:9000