UNPKG

mern-backend-quickstart

Version:

CLI tool to quickly generate a MERN backend boilerplate with optional auth middleware.

68 lines (50 loc) โ€ข 1.97 kB
๐Ÿš€MERN Backend Quickstart A professional, production-ready MERN backend boilerplate generator to help developers quickly scaffold backend projects using MongoDB, Express, and optional JWT Authentication. Customize your setup through the CLI to generate only the files you need. ๐Ÿ“ฅInstallation & Usage ๐Ÿ”ง Install Globally npm install -g mern-backend-quickstart ๐Ÿš€ Run CLI Anywhere create-mern-backend ๐Ÿ”ง Install Locally in a Project npm install mern-backend-quickstart ๐Ÿš€ Run CLI via NPX (No Global Install Needed) npx create-mern-backend ๐Ÿ› ๏ธFolder Structure : config/ โ”œโ”€โ”€ database.js controllers/ โ”œโ”€โ”€ sampleController.js middleware/ โ”œโ”€โ”€ authMiddleware.js # Optional (based on CLI answer) models/ โ”œโ”€โ”€ sampleModel.js routes/ โ”œโ”€โ”€ sampleRoute.js utils/ โ”œโ”€โ”€ generateToken.js # Optional (based on CLI answer) .env.example server.js package.json README.md โœจFeatures : ๐Ÿ”— MongoDB Connection using Mongoose โš™๏ธ Express Routing and Controllers ๐Ÿ” JWT Authentication (Optional via CLI) ๐Ÿ”‘ Bcrypt Password Hashing ๐Ÿ—‚๏ธ Clean, Scalable Project Structure ๐Ÿ› ๏ธ Optional Sample Files (Models, Controllers, Routes) ๐Ÿ“„ Auto-generated .env file ๐ŸŽฏWhy Use This? โœ… Saves time with ready-made structure โœ… Follows backend best practices โœ… Easily customizable through interactive CLI โœ… Quickly get started with real projects ๐Ÿ”งCLI Options When running create-mern-backend, you'll be prompted: Do you want Authentication Middleware? Do you want Sample Files? Your project is customized based on these answers. ๐Ÿง‘โ€๐Ÿ’ปAuthor Shraddha Tiwari Designed to save developers from writing the same boilerplate repeatedly.