create-my-backend-fastapp
v1.0.7
Published
CLI tool to scaffold an Express + MongoDB backend app
Maintainers
Readme
⚡ create-my-backend-fastapp
A blazing fast CLI tool to generate a fully structured Node.js backend with Express, Mongoose, environment variables, routing, and more — all set up in seconds.
🚀 Features
- ✅ Generates boilerplate backend with MVC structure
- ✅ MongoDB integration with Mongoose
- ✅
.envsupport for environment variables - ✅ CORS, Cookie Parser & JSON middleware pre-configured
- ✅ Pre-configured
vercel.jsonfor easy deployment - ✅ Ready to run with
npm run dev(nodemon)
📦 Installation
Option 1: Use with npx (No installation required)
npx create-my-backend-fastapp my-backend
🧱 Project Structure
my-backend/
├── .env
├── server.js
├── vercel.json
├── package.json
├── src/
│ ├── controllers/
│ │ └── example.controllers.js
│ ├── db/
│ │ └── db.js
│ ├── middelwares/
│ │ └── example.middelwares.js
│ ├── models/
│ │ └── models.js
│ ├── routes/
│ │ └── example.routes.js
│ └── utils/
│ └── utils.js🔧 Environment Setup:-
PORT=3000
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/<dbname>?retryWrites=true&w=majority
🧪 Example API Endpoints:-
| Method | Route | Description |
|--------|--------------------|-----------------|
| GET | / | API status |
| GET | /api/v1/example | Example route |
📤 Deployment This project is ready to deploy on platforms like Vercel, Render, or Heroku. Simply update your .env variables and deploy server.js.
🛠 Built With
- Express
- Mongoose
- dotenv
- nodemon
- cookie-parser
- cors
