Now that we have covered the basics of REST, let's put it into practice and build an API for
OrderBase, which was constructed in the previous chapter. If you have not done so already, please take a moment to review the code that we wrote there in order to make sure that you understand what happens between our API and the database in this example.
Start with creating a workspace for our server. On your drive, create a folder named
order_api, step into this folder, and create and execute the file named
api.js. Finally, open a terminal and execute the following:
As we saw in the previous chapter, this will give you a few questions to answer in order to bootstrap the Node.js server. ...