express-mysql-ts-starter
v1.0.2
Published
A CLI tool to create Express TypeScript projects
Downloads
12
Maintainers
Readme
Express MySQL TypeScript Starter (EMTS)
EMTS is a CLI tool that helps you quickly set up an Express.js + MySQL + TypeScript project with best practices.
🚀 Installation
To install the CLI globally, run:
npm install -g express-mysql-ts-starter📌 Usage
To create a new project, run:
emts <project-name>For example:
emts my-appOptions
--git: Initializes a Git repository.
Example:
emts my-app --git📂 Project Structure
After running the command, your project will have the following structure:
my-app/
│── src/
│ ├── http/ # HTTP Layer (Controllers, Middlewares, Requests, Shared Helpers)
│ ├── infrastructure/ # Business Logic (DTOs, Mappers, Implementations, Repositories)
│ ├── persistence/ # Database Layer (Migrations, Models, Connection)
│ ├── routes/ # API Routes
│ ├── shared/ # Common utilities, constants, and helpers
│ ├── app.ts # Express App Configuration
│ ├── config.ts # Application Configurations
│ ├── index.ts # Main Entry Point
│── .env # Environment Variables
│── .gitignore # Ignored Files
│── package.json # Project Dependencies
│── tsconfig.json # TypeScript Configuration🔧 Next Steps
- Navigate to your project folder:
cd my-app - Install dependencies (automatically done by CLI):
npm install - Create a
.envfile based on.env.example:cp .env.example .env - Run the project in development mode:
npm run dev
✨ Features
- Express.js with TypeScript
- MySQL & Sequelize ORM
- Environment variable support (
dotenv) - Security middleware (
helmet,cors) - Pre-configured folder structure
📜 License
This project is licensed under the MIT License.
