1.0.3 ⢠Published 4 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-nodejs
2ļøā£ Create a new Node.js project
kickstart-nodejs my-app
3ļøā£ Navigate into the project
cd my-app
4ļøā£ Install dependencies
npm install
5ļøā£ 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 publish
If you only updated the README without changing the version, run:
npm publish --tag latest
This will update the README on npm without changing the version number. š