1.0.3 ⢠Published 9 months ago
kickstart-nodejs v1.0.3
š Kickstart Node.js
A CLI tool to generate a structured Node.js project with Express, MongoDB, and essential configurations.
š Features
- š Pre-configured Folder Structure
- š ļø Express.js Integration
- š¾ MongoDB (Mongoose) Setup
- š§ Environment Variables (
.env) - ā Middleware & Utility Folders
- š§© Basic Test Script
- š Auto Dependency Installation
š ļø Installation
1ļøā£ Install via npm
npm install -g kickstart-nodejs2ļøā£ Create a new Node.js project
kickstart-nodejs my-app3ļøā£ Navigate into the project
cd my-app4ļøā£ Install dependencies
npm install5ļøā£ Start the server
npm startš Project Structure
my-app/
ā-- src/
ā āāā config/ # Database configuration
ā āāā controllers/ # Controllers (business logic)
ā āāā models/ # Mongoose Models
ā āāā routes/ # Express Routes
ā āāā middlewares/ # Custom Middleware
ā āāā services/ # Reusable services
ā āāā utils/ # Utility functions
ā-- tests/ # Test scripts
ā-- server.js # Main server file
ā-- .env # Environment variables
ā-- package.json # Project metadata & dependencies
ā-- .gitignore # Ignore files like `node_modules`š API Routes
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/users | Get all users |
š Environment Variables
Before running, update the .env file with:
PORT=5000
MONGO_URI=your_mongo_connection_stringš¤ Contributing
- Fork this repository.
- Clone your forked repo.
- Create a new branch (
git checkout -b feature-name). - Make your changes and commit (
git commit -m "Add new feature"). - Push the branch (
git push origin feature-name). - Open a Pull Request. š
š License
This project is MIT Licensed.
š Happy Coding! š
š¢ How to Update Your README on npm
After updating README.md, publish the changes:
npm publishIf you only updated the README without changing the version, run:
npm publish --tag latestThis will update the README on npm without changing the version number. š