UNPKG

create-express-application

Version:
67 lines (57 loc) โ€ข 1.62 kB
# 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