node-mvc-auto
v1.0.3
Published
A CLI tool to auto-generate Node.js MVC structure with Express, EJS, MongoDB, JWT, and bcrypt.js
Downloads
25
Maintainers
Readme
🚀 Node MVC Auto
node-mvc-auto is a CLI tool to instantly generate a Node.js MVC project structure with Express, EJS, MongoDB, JWT, and bcrypt.js. Perfect for kickstarting your backend projects without the hassle of manual setup! 🎯
📦 Features
- ✅ MVC Structure: Automatically creates folders for Models, Views, and Controllers.
- 🌟 Express: Sets up Express with basic routing.
- 📜 EJS: Adds template rendering.
- 🍃 MongoDB: Configures mongoose for database connectivity.
- 🔒 JWT: Includes JWT for authentication.
- 🔐 bcrypt.js: Integrates password hashing.
- 🌐 .env Support: Environment variables setup.
🛠️ Installation
To install the package globally:
npm install -g node-mvc-auto🚧 Usage
Create a new Node.js MVC project easily:
node-mvc-auto your-project-name✨ What happens next:
- Initializes a new Node.js project.
- Installs required dependencies.
- Generates the following folder structure:
your-project-name/
├── src/
│ ├── controllers/
│ │ └── userController.js
│ ├── models/
│ │ └── User.js
│ ├── routes/
│ │ └── userRoutes.js
│ ├── views/
│ │ └── index.ejs
│ └── app.js
├── public/
├── .env
├── package.json
└── README.md📚 Environment Variables
Make sure to configure your .env file:
PORT=3000
MONGO_URI=your_mongo_uri_here
JWT_SECRET=your_jwt_secret_here🏃 Running the App
Navigate to your project folder and start the server:
cd your-project-name
npm startYour app will run on:
http://localhost:3000📦 Dependencies Installed
The following packages are automatically installed:
- express: Fast, unopinionated, minimalist web framework
- ejs: Embedded JavaScript templating
- mongoose: MongoDB object modeling
- dotenv: Environment variable loader
- jsonwebtoken: JWT authentication
- bcryptjs: Password hashing
📖 Contribution
Contributions are welcome! Feel free to submit a pull request.
- Fork the repository.
- Create a new branch (
feature-branch). - Commit your changes.
- Push to the branch.
- Open a Pull Request.
⭐ License
This project is licensed under the MIT License.
🚀 Happy coding! Let's build something amazing! 💻
Visit Now Our Official Website For more ...
