Skip to content

Template for scalable Node.js applications with TypeScript and Express. Includes authentication, testing, and linting.

Notifications You must be signed in to change notification settings

RamirezPineda/node-ts-express-template

Repository files navigation

Node TypeScript Express Template

Static Badge Static Badge Static Badge Static Badge Static Badge

Description

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.

Feactures

  • Authentication and Authorization with JWT.
  • User management module with login, registration, and profile management.
  • Role-based access control.

Previous requirements

Node version >=22.0.0

Installation

  1. Clone the repository
git /~https://github.com/RamirezPineda/node-ts-express-template.git
  1. Navigate to the application directory:
cd node-ts-express-template
  1. Install the project dependencies:
npm install

Configuration

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

Running the app

# development
npm run dev

# production
npm run build
npm run start

Test

# unit tests
npm run test

# test coverage
npm run test:coverage

Linting

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

Author

Developed and maintained by RamirezPineda.

About

Template for scalable Node.js applications with TypeScript and Express. Includes authentication, testing, and linting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published