UNPKG

setup-node-boilerplate

Version:

A CLI tool to generate a standard Node.js + Express project structure instantly.

87 lines (58 loc) 1.85 kB
# 🚀 setup-node-boilerplate **The easiest Node.js + Express boilerplate CLI** 📦 Instantly generate a clean, ready-to-run backend project no manual setup, no messy copy-paste! --- ## ✨ What this CLI does - Generates standard folders: `config/`, `controllers/`, `models/`, `routes/`, `middleware/`, `utils/`, `logs/`, `public/` - Adds a working `server.js` with Express, dotenv & CORS setup - Auto-creates `.env`, `.gitignore` & `package.json` with useful dependencies & dev scripts - Gives you a **ready entry point** just run & start building APIs! --- ## ⚡ Quick Use — Just run this: ## 👉 `npx setup-node-boilerplate my-app` Run this **anywhere** **no install needed**: --- ## 🚀 Then do this ```bash cd my-app npm install # 📌 This installs node_modules npm run dev # ✅ Starts the dev server (with nodemon) Visit: http://localhost:5000 You’ll see: Server is running! 📂 What you get Example folder structure: my-app/ ├── config/ └── db.js (your DB connection file) ├── controllers/ ├── models/ ├── routes/ ├── middleware/ ├── utils/ ├── logs/ ├── public/ ├── .env ├── .gitignore ├── package.json ├── server.js ├── README.md 🗂️ How to extend Connect your MongoDB in config/db.js Add your models & controllers logic Create routes in routes/ Use middleware/ for auth, error handling etc. Boom your API is ready! 💡 Note 📌 This CLI does NOT auto-run npm install so you must run: npm install once the project is generated. This is 100% normal & standard for generators like create-react-app too! Tech stack included Express.js dotenv CORS nodemon (for dev) 🔗 Author Built with ❤️ by Rajkumar 📜 License MIT Free for everyone, forever!