...All endpoint methods are asynchronous, in order to use await in the code examples, we wrap them into an anonymous async function. Authentication is optional for some REST API endpoints accessing public data, but is required for GraphQL queries. Using authentication also increases your API rate limit.
A boilerplate for REST API Development with Node.js, Express, etc.
...I tried to maintain the code structure easily as any beginner can also adopt the flow and start building an API. The project is open for suggestions, Bug reports and pull requests. Basic Authentication (Register/Login with hashed password). Account confirmation with 4 (Changeable) digit OTP. Email helper ready just import and use. JWT Tokens, make requests with a token after login with Authorization header with value Bearer yourToken where yourToken will be returned in Login response. Pre-defined response structures with proper status codes. ...