abumahid e227c42f7d feat(account): update login response and modify CORS origin
- Changed the CORS origin from `http://localhost:3000` to `http://localhost:5173`.
- Updated the login response to return a comprehensive object containing the `accessToken` and user profile data.
- Modified cookie setup to directly use `result.accessToken` instead of `result`.
- Refactored account service to include additional user fields in the login data returned.
- Added `dist` to `.gitignore`.
2026-04-26 18:56:50 +06:00
2026-04-02 21:27:09 +06:00
2026-04-02 21:27:09 +06:00
2026-04-02 21:27:09 +06:00

Express Server CLI

npm version npm downloads npm total downloads Made with TypeScript Node.js


🚀 Overview

A powerful Express + TypeScript CLI that instantly generates scalable backend modules with Mongoose / Prisma, Zod validation, and Swagger documentation.

This tool helps developers quickly scaffold clean, modular Express APIs with minimal setup.

Features

  • Generate complete Express + TypeScript modules
  • 🧩 Built-in Mongoose / Prisma support
  • 📘 Adds Swagger documentation automatically
  • 📘 Automatic Swagger documentation
  • 🔐 Zod validation ready
  • 🏗️ Modular clean architecture
  • 🚀 One command project setup
  • 🔄 Add modules anytime
  • 📦 Zero boilerplate setup

📦 Quick Start

Run directly using npx (recommended):

npx exp-node-server -c my-api

This will:

  • Create an Express starter project
  • Install dependencies
  • Prepare the project for development

🧩 Generate a Module

Inside your project run:

npx express-server-cli -g <module-name>

Example: npx express-server-cli -g order

Output:

✔ order.interface.ts created
✔ order.schema.ts created
✔ order.validation.ts created
✔ order.route.ts created
✔ order.controller.ts created
✔ order.service.ts created
✔ order.swagger.ts created

🔗 Route registered in routes.ts
📘 Swagger docs registered

📁 Generated Module Structure

Each module follows a clean structure:

src/app/modules/<module-name>/
 ├── <module>.interface.ts
 ├── <module>.schema.ts
 ├── <module>.validation.ts
 ├── <module>.route.ts
 ├── <module>.controller.ts
 ├── <module>.service.ts
 └── <module>.swagger.ts

⚙️ Run the Project

npm run dev

Swagger docs available at:

http://localhost:5000/docs

🧠 Tech Stack

  • Express.js — Backend framework
  • TypeScript — Strongly typed JavaScript
  • Mongoose — MongoDB ODM
  • Prisma — PostgreSQL ORM
  • Zod — Runtime schema validation
  • JWT — Authentication
  • Swagger — API documentation

👨‍💻 Author

Abumahid

GitHub https://github.com/dev-abumahid

npm https://www.npmjs.com/~dev_abumahid

Portfolio https://abumahid.me

LinkedIn https://linkedin.com/in/md-abu-mahid-islam

Support

If you find this project helpful, consider giving it a on GitHub.

It helps the project grow and reach more developers.

S
Description
No description provided
Readme 162 KiB
Languages
TypeScript 98%
Dockerfile 1.1%
PLpgSQL 0.9%