A secure, rate-limited REST API backend template built with Express and TypeScript. Includes enhanced logging, IP detection, and security best practices.
- Express.js with TypeScript
- Security headers via helmet
- CORS enabled
- Rate limiting (100 requests per 15 minutes per IP)
- Enhanced request logging with IP detection
- Graceful shutdown handling
- Centralized error handling
- Node.js (v18+ recommended)
- npm
npm installCreate a .env file in the root directory. Example:
PORT=3000
NODE_ENV=development
Start the server with hot-reloading:
npm run devCompile TypeScript to JavaScript:
npm run buildStart the compiled server:
npm startSee LICENSE.