Express REST Framework
ExpressJS
Introduction - Basic Resources
Here is a complete tutorial in Express
Express web framework (Node.js/JavaScript) - Learn web development | MDN
Writing middleware for use in Express apps
How To Create a Custom Middleware in Express.js | DigitalOcean
Alternatively, if you like videos as tutorials.
Using Mongodb Database with express
Express provides support for using both Relational and NoSQL databases. Relation databases are generally derivative of SQL family data bases where one has to define different tables and relations between them for storing data. NoSQL databases do not use the traditional tables and relation format for storing data. Hence this becomes handy as developers get the freedom to store the data just in format it is used in their application. So, we will be using Mongodb a famous rival of SQL database family.
This tutorial from MDN will help you get started with using Mongodb:
Express Tutorial Part 3: Using a Database (with Mongoose) - Learn web development | MDN
Although freedom to store data just as it is used in application is helpful. It can also make life of developers terrible if there is no standard definitions about what is the format of data being stored. One cannot imagine using a data without knowing what it contains. So it becomes necessary to define some formal definitions (schema) and relations so that data can be used efficiently in the application. To help with this task another javascript framework Mongoose comes to rescue. There is no better way to learn using Mongoose than going through its documentation.
Populating relations in mongoose models:
Mongoose v5.13.2: Query Population
User Authentication System
Creating a backend without user login and authentication is incomplete. A user authentication system makes the app personalized for users. It takes the web app to altogether another level. There are several ways for authentication when working with Express.js
. In you task we are using passport
framework.
Here you can learn more about it
Authentication and Authorization with JWTs in Express.js
Testing the API
Well anything untested is never reliable. We provide you resources for setting up applications that can help you with testing the APIs you made. You can choose anyone or both and learn more about them through resources we have attached or through whatever sources of you choice.
Desktop API Design Editor and API Client
API Client for REST, SOAP, & GraphQL Queries | Postman
RESTful APIs in Express
HTTP Methods for RESTful Services
What are GET, POST, PUT, PATCH, DELETE? A walkthrough with JavaScript's Fetch API.
Challenge and submission
This Blog is a part of CSoC'21 Dev Backend.
Remember, deadline for this task is August 7th, 2021 23:59.
So much for learning, here is your next Assignment!
All the details of the task are provided in the README.md file.
As you are aware, you need to fork from and the repository, clone the forked repository, complete the task, commit and push your changes and finally open the pull request back here.