1.0.3 ⢠Published 6 months ago
node-mvc-auto v1.0.3
š 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.
- 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 ...