In this repository you will find a template for creating a Typescript backend project. It includes the entrypoint of the application, the testing framework, linter and docker already configured.
- Node.js as runtime environment
- Typescript as programming language
- Pnpm as package manager
- Express as web framework
- Jest for testing
- With Supertest for testing HTTP requests
- ESLint for linting
- Prettier for code formatting
- Docker for containerization
- Github Actions for CI (Continuous Integration)
# Install dependencies
pnpm install
# Run the application in development mode
pnpm run dev
# Build the application
pnpm run build
# Run the application in production mode
pnpm start
# Build the image
docker build -t <owner>/typescript-api-template:<tag> .
# Run the container
docker run --rm -p 8080:8080 <owner>/typescript-api-template:<tag>
pnpm test
# Run the linter
pnpm run lint
# Fix linting errors
pnpm run lint:fix