A client has approached you with a unique problem. They need a REST API, but cannot use a database. Their business requirements are as follows:
- The client needs an API (JSON) application that lets them create, edit, publish, and sometimes delete blog posts
- Each blog post has a title, a body, and a hero image
- Each blog post is written by an author
- This is a public blog API, so there are no rules on who can submit a post
- The client wants the ability to edit and delete authors, but without losing any blog data
- The client also wants a search functionality that can either query by author, or blog in a variety of manners such as: a) id b) title c) body
DO NOT FORK THIS REPO, CLONE IT AND REMOVE THE .git FOLDER
- Scaffold a basic app using Express (Node.js) in
index.js
. Don't rely on any other libraries. - Build out a REST API
- Build out a way to store the entities, using data structures
- Add Postman tests to hit all the requirements
- Zip up the entire folder and send it back
- Import the postman collection in tests/semantic_node.postman_collection.json
- Add new tests and save them to the collection
- Export the test json by overriding the existing collection
- Test these by running
yarn test
which will run the Newman tests in your CLI
- Optimization: think about what data structures are best
- UX/DX: the developers consuming the API are bad at reading docs but expect things to work nicely
- Performance: this may scale up to thousands of blog posts and authors
- Extensibility: this is that starting point, so think about how to write strong abstractions (don't write this part, but think about how it can be extended if we have questions)