A starter template for Node.js apps.
- Directly execute TypeScript on Node.js without precompiling with TypeScript Execute (
tsx
) - Opinionated TypeScript style guide, formatter, and linter using
gts
git
pre-commit hooks withhusky
jest
unit testing framework
- Create
package.json
file:
npm init --yes
- Install TypeScript:
npm i -D typescript @types/node
- Generate
tsconfig.json
with recommended settings:
npm install -D @tsconfig/node-lts
echo -e '{\n\t"extends": "@tsconfig/node-lts/tsconfig.json"\n}' >> tsconfig.json
- Install TypeScript Execute (
tsx
):
npm install -D tsx
- Configure
gts
:
npx gts init
- Install
husky
npx husky-init && npm install
- Setup
jest
:
npm i -D ts-jest @types/jest
npx ts-jest config:init