1.0.3 • Published 6 months ago

node-mvc-auto v1.0.3

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

šŸš€ 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 start

Your 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.

  1. Fork the repository.
  2. Create a new branch (feature-branch).
  3. Commit your changes.
  4. Push to the branch.
  5. 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 ...

🌐 Shatadhru Acharjee Official Website

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago