Hi guys,
So sometime in the past, I did a toptal interview and that last stage required me to build a small project and expose rest api.
From the feedback I got, it turns out that one of the major reason I failed was that I did not implement Rest properly, due to my implementation,
testing will be hard.
Fast forward to some months in the future I decided to learn a little Rest and built a small rest application with Nodejs + Express I need honest critiques on the project.
Summary of what I learnt and implemented
---------------------------------------------------------
1. The RESTApi can exists to expose an internal system.
2. The Api is capable of causing state change in the Application Data.
3. Resources are the fundamental unit of a RESTApi. Resources have a type, associated data, relationships and a set of methods that operate of it.
4. Collections are a group of Resources.
5. JSON is a good data model to use when doing REST.
6. Resources should have a type, hfref
7. How to implemente Asynchronous requests in REST.
8. Partial response and pagination. How it is important to have a default pagination setting.
etc.
I have implemented something small with just one Resource; `User`. Also, I have added authentication using JSON web tokens.
How does this implementation make testing my REST api possible(not possible) ?
Thank you.