A simple and lightweight boilerplate for building Node.js applications using the Express.js web framework. This starter project uses TypeScript, basic middleware setup, and minimal configuration to help you begin development quickly with a clean and extensible structure.
It’s ideal for small APIs, microservices, or as a base for larger backend services. (GitHub Repo)
- 🧠 Built with Express.js — Minimal, unopinionated Node.js web framework. (expressjs.com)
- 💻 TypeScript support — Strong typing for better developer experience.
- 🔌 Middleware setup (security, request parsing, routing).
- 🔧 Configurable via environment variables.
- 📦 Simple and easy to extend for your project needs.
├── src/
│ ├── app.ts # Core express app setting
│ ├── config/ # App configuration (env, base URL, etc.)
│ ├── middlewares/ # Custom middleware setup
│ ├── utils/ # Helpers / custom error handlers
│ └── server.ts # Entry point to start the server
├── .gitignore
├── package.json
├── tsconfig.json
└── request.http # Example request (for testing)
Make sure you have installed:
- Node.js (v16+ recommended)
- npm (comes with Node.js)
- Clone the repository
git clone https://github.com/Jushiro012623/express-framework.git
cd express-framework- Install dependencies
npm install- Create
.envfile
Copy and customize environment variables:
cp .env.example .env- Start the development server
npm run devBy default, the server runs on the port defined in your .env (fallback is 5001).
Once running:
curl http://localhost:5001You’ll get whatever default routes or API responses you’ve implemented — such as a basic health check or welcome endpoint.
From your project directory, you can run:
| Script | Description |
|---|---|
npm run dev |
Start server in development mode (restart on changes) |
npm test |
Placeholder; no tests defined |
| Variable | Default | Description |
|---|---|---|
PORT |
5001 |
Port where server listens |
BASE_URL |
/api/v1 |
Base API URL |
NODE_ENV |
development |
Environment setting |
APP_DEBUG |
false |
Enable debug logging |
Middleware such as security headers, body parsing, and route handling are configured in the middlewares folder to keep logic organized.
Contributions, improvements, and fixes are welcome! Feel free to:
- Submit issues
- Open pull requests
- Suggest features
This project currently has no license specified — consider adding one (e.g., MIT) if you plan to make it reusable in other projects.