This is a simple backend template using Express and TypeScript.
It features a clean structure with controllers, models, and routes, suitable for REST API development.
- TypeScript for type safety
- Express for fast API development
- Nodemon for auto-reloading during development
- Organized folders:
controllers,models,routes - Ready for expansion and integration with databases
npm installRuns the server with auto-reload on changes:
npm run devCompiles TypeScript to JavaScript:
npm run buildRuns the compiled server:
npm startbackend/
├── src/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ └── index.ts
├── package.json
├── tsconfig.json
- controllers/: Request logic, validation, authentication
- models/: Data access, database logic
- routes/: API endpoint definitions
- index.ts: Express app entry point
- Node.js >= 22
- npm >= 10