Project Personal Library
User stories
- 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 - All routes to be created within
routes/api.js
- Add any security features to
server.js
- Create all of the functional tests in
tests/2_functional-tests.js
- Nothing from the website will be cached in the client as a security measure. 7) Site powered by 'PHP 4.2.0' is seen, even though it isn't, as a security measure.
- post a
title
to /api/books to add a book and returned will be the object with thetitle
and a unique_id
. - get /api/books to retrieve an array of all books containing
title
,_id
, &commentcount
. - get /api/books/{_id} to retrieve a single object of a book containing
title
,_id
, & an array ofcomments
(empty array if no comments present). 11) post acomment
to /api/books/{_id} to add a comment to a book and returned will be the books object similar to get /api/books/{_id}. - delete /api/books/{_id} to delete a book from the collection. Returned will be 'delete successful' if successful.
- If a book is requested that doesn't exist, a 'no book exists' message will be displayed.
- delete request to /api/books to delete all books in the database. Returned will be 'complete delete successful' if successful.
- All 6 functional tests required are complete and passing.