@excli/express
Version:
A cli tool for creating Express.js applications, supporting both JavaScript and TypeScript.
156 lines (110 loc) ⢠3.11 kB
Markdown
# š„ Expressjs CLI Tool
A powerful, interactive CLI tool for creating Express.js applications with TypeScript/JavaScript support, Docker integration, and essential development tools setup.
[](https://badge.fury.io/js/%40excli%2Fexpress)
[](https://opensource.org/licenses/ISC)
## š Quick Start
### Using npx (Recommended)
```bash
npx @excli/express
```
### Global Installation
```bash
npm install -g @excli/express
excli
```
## š Prerequisites
- **Node.js** >= 20.0.0
- **npm** / **yarn** / **pnpm** (your choice)
- **Git** (optional, for version control)
- **Docker** (optional, for containerization)
## šÆ Getting Started
1. **Create your project:**
```bash
npx @excli/express
```
2. **Navigate to your project:**
```bash
cd my-awesome-app
```
3. **Start development:**
**Linux/macOS:**
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
**Windows (TypeScript projects only):**
_Open first terminal:_
```bash
npm run build -- --watch
```
_Open second terminal:_
```bash
npm run win:dev
```
_For JavaScript projects on Windows and Linux/MacOs:_
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```
4. **Open your browser:**
Navigate to `http://localhost:3000` š
> **Note:** The default port is 3000, but you can change it by setting `PORT=6969` in your `.env`
## š³ Docker Usage
If you selected Docker during setup:
```bash
# Start services with Docker Compose
npm run db:start
# Stop services
npm run db:stop
```
Your application will be available at `http://localhost:3000` with the database automatically configured.
## š Project Structure
```
my-awesome-app/
āāā node_modules/
āāā public/
āāā src/
ā āāā controllers/
ā āāā db/
ā āāā middlewares/
ā āāā models/
ā āāā routes/
ā āāā services/
ā āāā types/ (if typescript)
ā āāā utils/
ā āāā app.ts
ā āāā constant.ts
ā āāā main.ts
āāā .dockerignore
āāā .env
āāā .env.example
āāā .gitignore
āāā .prettierignore
āāā .prettierrc
āāā compose.yaml
āāā Dockerfile
āāā package.json
āāā tsconfig.json (if typescript)
```
## š ļø Available Scripts
- `npm run dev` - Start development server on Linux/MacOs
- `npm run build` - Build for production
- `npm run start` - Start production server
- `npm run win:dev` - Start development server on Windows (TypeScript)
## š License
This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.
## š¤ Author
**Noman**
- š§ Email: pxycknomdictator@gmail.com
- š GitHub: [@pxycknomdictator](https://github.com/pxycknomdictator)
---
<div align="center" style="margin-top: 20px;">
**š Happy Coding! Build something amazing! ā”**
_Made with ā¤ļø by [Noman](https://github.com/pxycknomdictator)_
</div>