create-node-app-starter
Version:
CLI to create a Node.js starter template
49 lines (35 loc) โข 1.08 kB
Markdown
# ๐ create-node-app-starter
A simple and powerful CLI tool to generate a **Node.js starter template** with Express, MongoDB, dotenv, and clean project structure.
Perfect for quick project setup without repeating boilerplate code!
## โญ Features
- โก Instant Node.js project setup
- ๐ฆ Preconfigured Express server
- ๐ MongoDB connection using Mongoose
- ๐ dotenv environment setup
- ๐ Clean folder structure
- ๐งช Sample routes
- ๐ฅ Server starts **only after MongoDB connects**
## ๐ฅ Installation & Usage
You don't need to install the package globally.
Just run:
```sh
npx create-node-app-starter my-app
```
Then:
```sh
cd my-app
```
## ๐ Environment Setup (.env)
Create a `.env` file in the root of the generated project (e.g. `my-app/.env`):
```env
PORT=5000
MONGO_URI=mongodb://localhost:27017/test
```
- `PORT` โ the port your Express server will run on (default 5000)
- `MONGO_URI` โ your MongoDB connection string
Finally, start the server:
```sh
npm start
```