A simple, modern Express.js project boilerplate using Jest, Babel, and best practices for rapid backend development and easy integration, and can also be used with Typescript or just Javascript.
- Express.js as the backend framework
- Javascript & Typescript support
- Jest for testing
- Babel for transpilation
- ESLint and Prettier for code quality and formatting
- Ready-to-use project structure (controllers, routes, tests)
- Common backend utilities: dotenv, cors, cookie-parser, mongoose, jsonwebtoken, bcryptjs, uuid, and more
src/
index.ts # Entry point
config/
limiter.config # Rate limiter config
controllers/
getter.controller # Controller
routes/
getter.route # Route
tests/
getHello.test # Testnpx create-ex-project <project-name>Installing the package will automatically install all dependencies.
Start the development server with hot-reloading:
npm run dev:startType-check in watch mode: for (Typescript only)
npm run dev:type-checkBuild the project:
npm run buildStart the production server after build (for Typescript only. You can proceed with npm start if using Javascript):
npm startOr build and start in one step: (Typescript only)
npm run build-startCheck linting errors:
npm run lintFix linting errors:
npm run lint:fixFormat code with Prettier:
npm run formatCheck formatting:
npm run format:checkRun all tests:
npm testGET /— Returns"Hello World"
- Add new routes in
src/routes/ - Add new controllers in
src/controllers/ - Add tests in
tests/