@ak-mern/backend
v1.1.8
Published
CLI to generate a Node backend boilerplate
Readme
Backend CLI
A Node.js CLI tool to quickly generate a backend project boilerplate with Express, MongoDB, JWT authentication, and more.
Installation
You have two options to use this CLI:
1. Install locally in a project
npm install @ak-mern/backend
npx create-node-backend2. Use directly with npx (no installation needed)
npx @ak-mern/backendThis method downloads and runs the CLI temporarily without installing it globally.
Usage
Run the CLI.
Enter the project name.
Enter the main file name (e.g., index.js, server.js, backend.js).
The CLI will generate:
<project-name>/
├─ src/
│ ├─ app.js
│ ├─ <main-file>.js
│ ├─ lib/
│ │ ├─ db.js
│ │ └─ env.js
│ ├─ controllers/
│ ├─ models/
│ │ └─ user.model.js
│ ├─ middlewares/
│ └─ routes/
├─ .env
├─ package.json
└─ .gitignore- Navigate into your project:
cd <project-name>- Start the development server:
npm run devFeatures
Express backend boilerplate
Preconfigured MongoDB connection (mongoose)
JWT + bcrypt authentication support
Environment variables ready with .env
Folder structure: controllers, models, routes, middlewares, lib
Development setup with nodemon
License
MIT © Abhinav Kumar
