A template for building scalable and maintainable server-side applications using Node.js, TypeScript, and Express. This template is pre-configured with ESLint for code quality, Vitest for testing, and follows modern development practices.
- Authentication and Authorization with JWT.
- User management module with login, registration, and profile management.
- Role-based access control.
Node version >=22.0.0
- Clone the repository
git /~https://github.com/RamirezPineda/node-ts-express-template.git
- Navigate to the application directory:
cd node-ts-express-template
- Install the project dependencies:
npm install
Rename the .env.example file to .env and set the environment variables
# before
|--src
|--tests
|--.env.example
...
...
...
|--vitest.config.mts
# after
|--src
|--tests
|--.env
...
...
...
|--vitest.config.mts
# development
npm run dev
# production
npm run build
npm run start
# unit tests
npm run test
# test coverage
npm run test:coverage
To run the linter you can execute:
npm run lint
And for trying to fix lint issues automatically, you can run:
npm run lint:fix
Developed and maintained by RamirezPineda.