create-express-application
Version:
CLI tool to scaffold a boilerplate Express.js application
67 lines (57 loc) โข 1.62 kB
Markdown
# create-express-application ๐ ๏ธ
A zero-config CLI tool to bootstrap a modern Express.js server with support for JavaScript or TypeScript, environment variables, code formatting, and project scaffolding.
[npmjs](https://www.npmjs.com/package/create-express-application)
## โจ Features
- ๐ฆ One-command project setup
- โ๏ธ Support for **JavaScript** or **TypeScript**
- ๐ Auto-generated folder structure: `routes`, `controllers`, `middlewares`, `utils`, `models`
- ๐ CORS and dotenv support
- ๐จ ESLint + Prettier config scaffolding
- ๐งช Ready for Git with optional `git init`
## ๐ฅ Installation
```bash
npx create-express-application
```
Or clone it locally:
```bash
git clone https://github.com/your-org/create-express-app.git
cd create-express-app
npm install
npm link
```
## ๐ Usage
Run the CLI and follow prompts:
```bash
npm create express-application@latest
```
It will ask:
- Project name
- Preferred language: JavaScript or TypeScript
- Include .env support?
- Initialize Git repo?
## ๐๏ธ Generated Project Structure
```
your-project/
โโโ src/
โ โโโ controllers/
โ โโโ middlewares/
โ โโโ models/
โ โโโ routes/
โ โโโ utils/
โ โโโ index.ts|js
โโโ .env
โโโ .gitignore
โโโ .eslintrc.json
โโโ .prettierrc
โโโ package.json
โโโ tsconfig.json (if TypeScript)
โโโ README.md
```
## ๐ง Scripts
```bash
npm run dev # Starts the dev server (with watch mode)
npm start # Starts the compiled JS server
npm run build # TypeScript only: compiles to dist/
```
## ๐ License
ISC