1.0.10 • Published 6 months ago

@ranjit099/create-express-app-backend v1.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

šŸš€ create-express-app-backend

A simple, production-ready CLI tool to scaffold a complete Express.js backend project with just one command.

šŸ“¦ Installation

1 npx create-express-app-backend my-backend
2 cd my-backend
3 npm install
4 npm start



✨ Features
āœ… Production-ready folder structure

āœ… Built-in MongoDB connection with Mongoose

āœ… Environment variable support with .env & .env.example

āœ… Sample route, controller, model, and middleware included

āœ… EJS templating setup in views/

āœ… Static files served from public/ (with default CSS & JS)

āœ… Logging middleware sample

āœ… Ready-to-use utility file

āœ… Git-friendly: Includes .gitignore for user projects

āœ… Works via npx or global install




šŸ“ Folder Structure

my-backend-app/
ā”œā”€ā”€ app.js                  # Main entry point
ā”œā”€ā”€ .env                   # Your environment config
ā”œā”€ā”€ .gitignore             # Common ignored files
ā”œā”€ā”€ config/
│   └── db.js              # MongoDB connection setup
ā”œā”€ā”€ controllers/
│   └── sampleController.js # Sample controller logic
ā”œā”€ā”€ middlewares/
│   └── logger.js          # Example middleware
ā”œā”€ā”€ models/
│   └── Sample.js          # Mongoose schema example
ā”œā”€ā”€ public/
│   ā”œā”€ā”€ css/
│   │   └── style.css      # Sample CSS
│   └── js/
│       └── script.js      # Sample JS
ā”œā”€ā”€ routes/
│   └── sampleRoutes.js    # Example Express route
ā”œā”€ā”€ utils/
│   └── helper.js          # Sample utility function
ā”œā”€ā”€ views/
│   └── index.ejs          # EJS template
└── package.json           # Project config




āš™ļø Technologies Used
1 Node.js

2 Express.js

3 Mongoose

4 EJS

5 dotenv



šŸ”§ How It Works
---------------------
When you run:--
bash
Copy code
npx create-express-app-backend my-backend-app

This CLI will:

1 Copy the project template to my-backend-app/

2 Initialize it with its own package.json

3 Add basic files like .gitignore, .env, and starter code

4 Set you up for success with a clean structure.




šŸ¤ Contributing
-----------------------------
@ Contributions, ideas, and improvements are  
welcome!

1 Fork the repo

2 Make your changes

3 Submit a pull request



šŸ“„ License
NSEC Ā© rj-web-dev

Git :- https://github.com/ranjit800/create-express-app-backend
1.0.10

6 months ago

1.0.9

6 months ago