Express + TypeScript + Boilerplate for Web / API App
Welcome to the Express TypeScript Boilerplate 2024 โ a streamlined, efficient, and scalable foundation for building powerful backend services. This boilerplate merges modern tools and practices in Express.js and TypeScript, enhancing productivity, code quality, and performance.
Developed to streamline backend development, this boilerplate is your solution for:
git clone https://github.com/edwinhern/express-typescript-2024.git
cd express-typescript-2024
npm ci
.env
: Copy .env.template
to .env
.env
: Fill in necessary environment variablesnpm run dev
npm run build
.env
to NODE_ENV="production"
then npm run build && npm run start
.
โโโ api
โ โโโ healthCheck
โ โ โโโ __tests__
โ โ โ โโโ healthCheckRouter.test.ts
โ โ โโโ healthCheckRouter.ts
โ โโโ user
โ โโโ __tests__
โ โ โโโ userRouter.test.ts
โ โ โโโ userService.test.ts
โ โโโ userModel.ts
โ โโโ userRepository.ts
โ โโโ userRouter.ts
โ โโโ userService.ts
โโโ api-docs
โ โโโ __tests__
โ โ โโโ openAPIRouter.test.ts
โ โโโ openAPIDocumentGenerator.ts
โ โโโ openAPIResponseBuilders.ts
โ โโโ openAPIRouter.ts
โโโ common
โ โโโ __tests__
โ โ โโโ errorHandler.test.ts
โ โ โโโ requestLogger.test.ts
โ โโโ middleware
โ โ โโโ errorHandler.ts
โ โ โโโ rateLimiter.ts
โ โ โโโ requestLogger.ts
โ โโโ models
โ โ โโโ serviceResponse.ts
โ โโโ utils
โ โโโ commonValidation.ts
โ โโโ envConfig.ts
โ โโโ httpHandlers.ts
โโโ index.ts
โโโ server.ts
We'd love to hear your feedback and suggestions for further improvements. Feel free to contribute and join us in making backend development cleaner and faster!
๐ Happy coding!