In this post, we will go through the frameworks and the tools that we will be using in this tutorial to build a RESTful API from scratch.
This section contains a list of frameworks that we will use to develop the RESTful service.
Since the V8 runs on the multiple platforms such as Windows, macOS, and Linux, Node.js runtime is also running on those platforms as well.
Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy.
Express provides a thin layer of fundamental web application features, without obscuring Node.js features that you know and love. Many popular frameworks are based on Express which can be found in this
MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need.
MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time. The document model maps to the objects in your application code, making data easy to work with.
Mongoose is an elegant MongoDB object modeling for node.js.
Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in typecasting, validation, query building, business logic hooks and more, out of the box.
We will be using this framework to run the unit tests and integration tests for the RESTful service that we are going to create in this tutorial. You can check out the website to know more about it and also documentation for its usage.
BDD style, which is chain-capable, provides expressive language and readable form. TDD style offers the traditional feel of assertion for testing. Refer the Chai’s
This section contains a list of tools that we will use to develop and test the RESTful service.
IDE (Integrated Development Environment)
To build an API with any language or framework, we need to have a development environment set up at the local machine, the developer’s desktop/laptop.
You can use any of the operating systems (Windows/macOS/Linux) available out there as per your choice and convenience. Depends on the OS of your choice, there are many IDEs available in these options, free/paid.
Each developer has his/her own choice of the IDE as well. Whatever your choice may be, for building the REST API described in this book you would need a NodeJS development supported IDE.
Below are the few of the famous IDEs that you can choose from depends on your OS and you are comfortable with.
Please check out the index page for this Node.js RESTful API development with TDD approach tutorial with all the posts in sequence in one place.
This blog post is an excerpt from the book Building Node.js REST API with TDD approach. Please check out the link for more information.