A boilerplate/starter project for quickly building RESTful APIs using Node.js, Express, and Mongoose. By running a single command, you will get a production-ready Node.js app installed and fully configured on your machine. The app comes with many built-in features, such as authentication using JWT, request validation, unit and integration tests, continuous integration, docker support, API documentation, pagination, etc. The app has a utility ApiError class to which you can attach a response code and a message, and then throw it from anywhere (catchAsync will catch it). Request data is validated using Joi. Check the documentation for more details on how to write Joi validation schemas. In production mode, only info, warn, and error logs will be printed to the console. It is up to the server (or process manager) to actually read them from the console and store them in log files.

Features

  • NoSQL database: MongoDB object data modeling using Mongoose
  • Authentication and authorization: using passport
  • Validation: request data validation using Joi
  • Logging: using winston and morgan
  • Testing: unit and integration tests using Jest
  • Error handling: centralized error handling mechanism

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow RESTful API Node Server Boilerplate

RESTful API Node Server Boilerplate Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of RESTful API Node Server Boilerplate!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Frameworks, JavaScript Web Development Software

Registered

2022-10-31