Project Personal Library
- ADD YOUR MongoDB connection string to .env without quotes as db
example: DB=mongodb://admin:pass@1234.mlab.com:1234/fccpersonallib
- SET NODE_ENV to
test
without quotes - You need to create all routes within
routes/api.js
- You will add any security features to
server.js
- You will create all of the functional tests in
tests/2_functional-tests.js
Learning Notes
- Two different ways of updating a document - findOneAndUpdate and updateOne then findOne
- Deleting all documents using deleteMany()
- Connecting to MongoDB within each GET/POST/DELETE request using async await
- Using include in chai.js
- Sending response codes using return res.status(400).send('error');
- Including Content Security Policies which can easily mess up your code