Typescript Node Template

Node Typescript configurations for performance and good code style πŸš€ πŸš€

😎 Features

  • πŸš€ Fast: Configured for fast development.
  • πŸ’» Easy Development: Development configurations like hot-reloading, all with performance improve configurations.
  • πŸ—οΈ Build: Build commands to ship light production code.
  • πŸ’§ Clean: Linting and Formatting commands to keep your code clean.
  • πŸ’» Os Compatible: All the scripts are OS compatible.
  • πŸ”΄ 🟒 Test - Testing framework with coverage generation.

πŸ’» Usage

  1. Install pnpm (npm and yarn could be used but are slower)

  2. Fork and clone the repo then install dependencies runing

pnpm install

Then:

  • Add all your files in the src/ directory.
  • Your build code will be in the dist/ directory.
  • Run pnpm dev for developing
  • Run pnpm test for testing
  • Run pnpm lint to check linting or pnpm lint:fix for auto fixing linting problems

To run the project in production run

pnpm install
pnpm build
pnpm start

Use all the template scripts under the package.json file.

πŸ€” ΒΏWhy this template?

  • We all know the time and effort that must be spended in a node project to follow good code practices, including linting, formating and testing, the idea of this project is to group a lot of this good practices in a minimal template that could be used for many projects.
  • Another common problem with typescript is that all the bundling and compiling is by default slow, using more modern compilers this repo introduce a lot of performance improvement, for faster build times and automatic test iterations.

πŸ“š Core Libraries and technologies:

  • Typescript: Better quality code and scalability with support for types, static code anΓ‘lisys, interfaces, decorators, etc.
  • Jest: Automated testing library
  • Eslint: Linter for better code quality
  • Prettier: Formatter so all the codes looks the same
  • esbuild: For fast building, hot-reloading and testing.
  • pnpm: For fast dependency installation.

✨ Contributing

If you have any idea that could make this project better please make an issue and open a pull request to add any feature you need!

πŸ“– Credits

The following project takes a lot of configurations of Faker project, including scripts, readme, etc. Go check the library, they have really nice tooling!.