Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

create-nodejs-ts

vitorsalgado165MIT3.0.2TypeScript support: included

NodeJS Starter Project Kit

nodejs, nodejs-boilerplate, typescript, typescript-boilerplate, starter, boilerplate, scaffold, template

readme

Node.js Starter ToolKit

Starter Project for a Node.js application using TypeScript with all boring stuff already configured.

GitHub Action Status npm Prettier Conventional Commits

Overview

Starter project for Node.js applications using TypeScript with test, lint, code formatter already configured. Check the tooling section for more details.
The preferable way to use this boilerplate is using npx command. You can use npm init too.
Use the following commands to bootstrap a new project:

NPX

npx create-nodejs-ts --no --app=your-app

NPM Init

npm init nodejs-ts -- --app=your-app

Without parameters, the project will be created on a folder my-app in the same directory where you executed the command.
All parameters available:

--destination=<FOLDER_DESTINATION> Defaults to the current directory
--app=<APP_NAME> Defaults to my-app

The final folder will the parameter destination, if provided, concatenated with the parameter app.

ESM

The project template now uses ESM by default.

Docker

Minimalist docker image generation.
Check this Dockerfile.

Local Dev Environment

Run make up to spin up a local environment with Docker Compose.
Check this docker-compose.yml for more details.

Tooling

  • ESM
  • TypeScript
  • Jest
  • EsLint
  • Husky
  • Commit Lint
  • Lint Staged
  • Prettier
  • Nodemon
  • Docker | Docker Compose

License

FOSSA Status

This project is MIT Licensed.

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

3.0.2 (2022-06-29)

Docs

Build

  • deps-dev: bump @commitlint/cli from 16.2.4 to 17.0.0 (#329) (f959ba4)
  • deps-dev: bump @commitlint/cli from 17.0.0 to 17.0.1 (#338) (f1576e4)
  • deps-dev: bump @commitlint/cli from 17.0.1 to 17.0.2 (#345) (00637fe)
  • deps-dev: bump @commitlint/cli from 17.0.2 to 17.0.3 (#371) (d0d2653)
  • deps-dev: bump @commitlint/config-conventional (#326) (926de47)
  • deps-dev: bump @commitlint/config-conventional (#351) (8afa683)
  • deps-dev: bump @commitlint/config-conventional (#367) (d513d85)
  • deps-dev: bump @jest/globals from 28.0.3 to 28.1.0 (#317) (26d75cb)
  • deps-dev: bump @jest/globals from 28.1.0 to 28.1.1 (#354) (b604161)
  • deps-dev: bump @jest/types from 28.0.2 to 28.1.0 (#320) (3719811)
  • deps-dev: bump @types/jest from 27.4.1 to 27.5.0 (#322) (f04b24e)
  • deps-dev: bump @types/node from 17.0.31 to 17.0.33 (#328) (a9a8d8a)
  • deps-dev: bump @types/node from 17.0.33 to 17.0.35 (#332) (2f66078)
  • deps-dev: bump @types/node from 17.0.35 to 17.0.36 (#339) (7408c71)
  • deps-dev: bump @types/node from 17.0.36 to 17.0.40 (#348) (00c9b06)
  • deps-dev: bump @types/node from 17.0.40 to 17.0.42 (#358) (3485902)
  • deps-dev: bump @types/node from 17.0.42 to 18.0.0 (#365) (bf2fa61)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#319) (e5ca6e0)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#334) (5f6a201)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#343) (d5a6940)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#347) (36def76)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#355) (50ff660)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#364) (2b0728a)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#368) (7b9bfa5)
  • deps-dev: bump @typescript-eslint/parser from 5.21.0 to 5.22.0 (#323) (437b27e)
  • deps-dev: bump @typescript-eslint/parser from 5.22.0 to 5.23.0 (#330) (2ef7214)
  • deps-dev: bump @typescript-eslint/parser from 5.23.0 to 5.25.0 (#335) (f2f98f2)
  • deps-dev: bump @typescript-eslint/parser from 5.25.0 to 5.26.0 (#342) (400bc6e)
  • deps-dev: bump @typescript-eslint/parser from 5.26.0 to 5.27.0 (#350) (e4e175d)
  • deps-dev: bump @typescript-eslint/parser from 5.27.0 to 5.27.1 (#357) (ef9cf0a)
  • deps-dev: bump @typescript-eslint/parser from 5.27.1 to 5.28.0 (#366) (d2de694)
  • deps-dev: bump @typescript-eslint/parser from 5.28.0 to 5.29.0 (#372) (4878a0a)
  • deps-dev: bump eslint from 8.14.0 to 8.15.0 (#321) (7534b89)
  • deps-dev: bump eslint from 8.15.0 to 8.16.0 (#333) (72ec130)
  • deps-dev: bump eslint from 8.16.0 to 8.17.0 (#346) (d52c5e3)
  • deps-dev: bump eslint from 8.17.0 to 8.18.0 (#360) (2286036)
  • deps-dev: bump husky from 7.0.4 to 8.0.1 (#318) (46edc12)
  • deps-dev: bump lint-staged from 12.4.1 to 12.4.3 (#340) (a8590ca)
  • deps-dev: bump lint-staged from 12.4.3 to 13.0.0 (#349) (5765fc8)
  • deps-dev: bump lint-staged from 13.0.0 to 13.0.1 (#359) (72ad6c8)
  • deps-dev: bump lint-staged from 13.0.1 to 13.0.2 (#362) (dff606d)
  • deps-dev: bump lint-staged from 13.0.2 to 13.0.3 (#370) (ebccb5c)
  • deps-dev: bump nodemon from 2.0.16 to 2.0.18 (#369) (cdaff85)
  • deps-dev: bump prettier from 2.6.2 to 2.7.1 (#361) (350bf8c)
  • deps-dev: bump ts-node from 10.7.0 to 10.8.0 (#336) (75227bb)
  • deps-dev: bump ts-node from 10.8.0 to 10.8.1 (#353) (53eac4c)
  • deps-dev: bump typescript from 4.6.4 to 4.7.2 (#341) (19987ec)
  • deps-dev: bump typescript from 4.7.2 to 4.7.3 (#352) (06d0b1d)
  • deps-dev: bump typescript from 4.7.3 to 4.7.4 (#363) (eddec34)
  • deps: bump actions/setup-node from 3.1.1 to 3.2.0 (#325) (17ab113)
  • deps: bump actions/setup-node from 3.2.0 to 3.3.0 (#344) (bf9d0d2)
  • deps: bump dotenv from 16.0.0 to 16.0.1 (#327) (21c6493)
  • deps: bump fastify/github-action-merge-dependabot (#316) (159f7f4)
  • deps: bump fastify/github-action-merge-dependabot (#324) (1039548)
  • deps: bump fastify/github-action-merge-dependabot (#331) (fe9ac69)
  • deps: bump fastify/github-action-merge-dependabot (#337) (4e60694)

3.0.1 (2022-05-05)

Docs

  • remove nodejs min version badge (a6528d6)

Build

  • deps-dev: bump @commitlint/cli from 16.2.3 to 16.2.4 (#309) (012e1dd)
  • deps-dev: bump @commitlint/config-conventional (#314) (0c30c73)
  • deps-dev: bump @jest/globals from 27.5.1 to 28.0.0 (#303) (5abdb77)
  • deps-dev: bump @jest/globals from 28.0.0 to 28.0.3 (#311) (bd87b58)
  • deps-dev: bump @jest/types from 27.5.1 to 28.0.0 (#297) (4085359)
  • deps-dev: bump @types/node from 17.0.23 to 17.0.24 (#293) (88fa743)
  • deps-dev: bump @types/node from 17.0.24 to 17.0.26 (#302) (24d1f96)
  • deps-dev: bump @types/node from 17.0.26 to 17.0.31 (#305) (5790d11)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#288) (2ffcb7b)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#294) (4e2b77a)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#299) (dd8c333)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#307) (7d5e4fd)
  • deps-dev: bump @typescript-eslint/parser from 5.17.0 to 5.18.0 (#287) (1dcc828)
  • deps-dev: bump @typescript-eslint/parser from 5.18.0 to 5.19.0 (#290) (73e8350)
  • deps-dev: bump @typescript-eslint/parser from 5.19.0 to 5.20.0 (#300) (fe6002f)
  • deps-dev: bump @typescript-eslint/parser from 5.20.0 to 5.21.0 (#310) (5e40adb)
  • deps-dev: bump eslint from 8.12.0 to 8.13.0 (#286) (80bbd06)
  • deps-dev: bump eslint from 8.13.0 to 8.14.0 (#298) (e77b1b7)
  • deps-dev: bump eslint-plugin-import from 2.25.4 to 2.26.0 (#285) (ede4c08)
  • deps-dev: bump eslint-plugin-tsdoc from 0.2.14 to 0.2.16 (#284) (40ed5a7)
  • deps-dev: bump lint-staged from 12.3.7 to 12.3.8 (#291) (57e8829)
  • deps-dev: bump lint-staged from 12.3.8 to 12.4.0 (#301) (0695b6e)
  • deps-dev: bump lint-staged from 12.4.0 to 12.4.1 (#306) (1912c48)
  • deps-dev: bump nodemon from 2.0.15 to 2.0.16 (#315) (f887d8e)
  • deps-dev: bump prettier from 2.6.1 to 2.6.2 (#280) (1985aef)
  • deps-dev: bump supertest from 6.2.2 to 6.2.3 (#313) (ac420f7)
  • deps-dev: bump typescript from 4.6.3 to 4.6.4 (#308) (bc6e572)
  • deps: bump actions/setup-node from 3.0.0 to 3.1.0 (#279) (040658f)
  • deps: bump actions/setup-node from 3.1.0 to 3.1.1 (#283) (ccf9ac8)
  • deps: bump codecov/codecov-action from 2 to 3 (#282) (8372e84)
  • deps: bump fastify/github-action-merge-dependabot (#289) (cea4d34)
  • deps: bump fastify/github-action-merge-dependabot (#295) (85edb14)
  • deps: bump fs-extra from 10.0.1 to 10.1.0 (#292) (4a8e4f7)
  • deps: bump github/codeql-action from 1 to 2 (#296) (590be01)
  • deps: bump tslib from 2.3.1 to 2.4.0 (#304) (658b268)

3.0.0 (2022-03-30)

⚠ BREAKING CHANGES

  • move code base to esm

Signed-off-by: Vitor Hugo Salgado vsalgadopb@gmail.com

Features

  • improve main script code and testability (976896c)
  • use esm (a2e2563)

Bug Fixes

  • remove dev deps and release script (bb8d8a6)

Build

  • add docker to dependabot.yml (a7a687d)
  • add Windows os to ci + apply some fixes (d6585e6)
  • deps-dev: bump @commitlint/cli from 16.1.0 to 16.2.1 (#234) (0903e51)
  • deps-dev: bump @commitlint/cli from 16.2.1 to 16.2.3 (#264) (51aea47)
  • deps-dev: bump @commitlint/config-conventional (#236) (536a522)
  • deps-dev: bump @types/jest from 27.4.0 to 27.4.1 (#244) (113a641)
  • deps-dev: bump @types/node from 17.0.14 to 17.0.15 (#226) (83fa0a7)
  • deps-dev: bump @types/node from 17.0.15 to 17.0.16 (#231) (2bce611)
  • deps-dev: bump @types/node from 17.0.16 to 17.0.17 (#232) (bb20041)
  • deps-dev: bump @types/node from 17.0.17 to 17.0.18 (#239) (4308f92)
  • deps-dev: bump @types/node from 17.0.18 to 17.0.19 (#240) (cdcf7dc)
  • deps-dev: bump @types/node from 17.0.19 to 17.0.20 (#245) (8ce573b)
  • deps-dev: bump @types/node from 17.0.20 to 17.0.21 (#248) (beebd28)
  • deps-dev: bump @types/node from 17.0.21 to 17.0.22 (#268) (ca50f06)
  • deps-dev: bump @types/node from 17.0.22 to 17.0.23 (#271) (2428025)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#230) (ae1e223)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#238) (41b354e)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#242) (b184454)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#250) (411bd76)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#258) (4f50c92)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#262) (f275912)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#269) (994c1ce)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#277) (c8c5a97)
  • deps-dev: bump @typescript-eslint/parser from 5.10.2 to 5.11.0 (#228) (c165c53)
  • deps-dev: bump @typescript-eslint/parser from 5.11.0 to 5.12.0 (#237) (b103c84)
  • deps-dev: bump @typescript-eslint/parser from 5.12.0 to 5.12.1 (#243) (278aa86)
  • deps-dev: bump @typescript-eslint/parser from 5.12.1 to 5.13.0 (#252) (69dc8e5)
  • deps-dev: bump @typescript-eslint/parser from 5.13.0 to 5.14.0 (#259) (44dbe57)
  • deps-dev: bump @typescript-eslint/parser from 5.14.0 to 5.15.0 (#261) (6a8f152)
  • deps-dev: bump @typescript-eslint/parser from 5.15.0 to 5.16.0 (#270) (756a7ef)
  • deps-dev: bump @typescript-eslint/parser from 5.16.0 to 5.17.0 (#278) (8cc59de)
  • deps-dev: bump eslint from 8.10.0 to 8.11.0 (#260) (50bc543)
  • deps-dev: bump eslint from 8.8.0 to 8.9.0 (#233) (5e527bf)
  • deps-dev: bump eslint from 8.9.0 to 8.10.0 (#249) (ba2ef99)
  • deps-dev: bump eslint-config-prettier from 8.3.0 to 8.4.0 (#241) (66456e3)
  • deps-dev: bump eslint-config-prettier from 8.4.0 to 8.5.0 (#255) (b7c02d7)
  • deps-dev: bump jest from 27.4.7 to 27.5.0 (#225) (cf87447)
  • deps-dev: bump jest from 27.5.0 to 27.5.1 (#229) (1fde9fc)
  • deps-dev: bump lint-staged from 12.3.3 to 12.3.4 (#235) (d9dbcd0)
  • deps-dev: bump lint-staged from 12.3.4 to 12.3.5 (#256) (00b3d7f)
  • deps-dev: bump lint-staged from 12.3.5 to 12.3.6 (#265) (6f49ede)
  • deps-dev: bump lint-staged from 12.3.6 to 12.3.7 (#266) (24956db)
  • deps-dev: bump prettier from 2.5.1 to 2.6.0 (#263) (d8354c5)
  • deps-dev: bump prettier from 2.6.0 to 2.6.1 (#274) (05878c8)
  • deps-dev: bump ts-node from 10.5.0 to 10.6.0 (#254) (fd07f54)
  • deps-dev: bump ts-node from 10.6.0 to 10.7.0 (#257) (d881922)
  • deps-dev: bump typescript from 4.5.5 to 4.6.2 (#251) (8b2aed2)
  • deps-dev: bump typescript from 4.6.2 to 4.6.3 (#272) (d201d8a)
  • deps: bump actions/cache from 2 to 3 (#267) (522a167)
  • deps: bump actions/checkout from 2 to 3 (#253) (bf6c284)
  • deps: bump actions/setup-node from 2 to 3.0.0 (#247) (f793b47)
  • deps: bump fs-extra from 10.0.0 to 10.0.1 (#246) (6b275ab)
  • deps: bump minimist from 1.2.5 to 1.2.6 (#275) (b861ba2)
  • escape prettier dir cmd param (b863a91)
  • remove nvm from Makefile (f7a362c)

Chore

Docs

Refactor

  • adjust cmd (ab747f5)
  • adjust cmd script (fd20ec5)
  • change .gitignore (c422349)
  • improve and simplify eslint configuration (3e51c52)
  • remove local standard-version (44af724)
  • template: change node version to 16 (a143554)
  • upgrade nodejs (5750f5a)
  • use .cjs extension on configs (29abeaa)

2.1.0 (2022-02-04)

Features

Build

  • deps-dev: bump @commitlint/cli from 16.0.2 to 16.0.3 (#203) (cf39e1e)
  • deps-dev: bump @commitlint/cli from 16.0.3 to 16.1.0 (#206) (6c0e6ef)
  • deps-dev: bump @types/node from 17.0.10 to 17.0.12 (#211) (a364b9b)
  • deps-dev: bump @types/node from 17.0.12 to 17.0.13 (#216) (f6627f4)
  • deps-dev: bump @types/node from 17.0.13 to 17.0.14 (#219) (5ee38c7)
  • deps-dev: bump @types/node from 17.0.8 to 17.0.9 (#198) (417c3b5)
  • deps-dev: bump @types/node from 17.0.9 to 17.0.10 (#205) (a076c68)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#201) (c57d52a)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#212) (53ed9f6)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#221) (99d1f89)
  • deps-dev: bump @typescript-eslint/parser from 5.10.0 to 5.10.1 (#213) (3cfd15d)
  • deps-dev: bump @typescript-eslint/parser from 5.10.1 to 5.10.2 (#220) (235f458)
  • deps-dev: bump @typescript-eslint/parser from 5.9.1 to 5.10.0 (#200) (157392f)
  • deps-dev: bump eslint from 8.6.0 to 8.7.0 (#197) (1a7b4e2)
  • deps-dev: bump eslint from 8.7.0 to 8.8.0 (#218) (4efd6f5)
  • deps-dev: bump lint-staged from 12.1.7 to 12.2.1 (#204) (52f043b)
  • deps-dev: bump lint-staged from 12.2.1 to 12.2.2 (#207) (2bb47a4)
  • deps-dev: bump lint-staged from 12.2.2 to 12.3.1 (#209) (67bffd9)
  • deps-dev: bump lint-staged from 12.3.1 to 12.3.2 (#215) (ad019f2)
  • deps-dev: bump lint-staged from 12.3.2 to 12.3.3 (#222) (f8fef00)
  • deps-dev: bump ts-jest from 27.1.2 to 27.1.3 (#199) (fe7325a)
  • deps-dev: bump typescript from 4.5.4 to 4.5.5 (#208) (b7579f1)
  • deps: bump dotenv from 11.0.0 to 14.1.0 (#196) (67bf53f)
  • deps: bump dotenv from 14.1.0 to 14.2.0 (#202) (80e218c)
  • deps: bump dotenv from 14.2.0 to 14.3.0 (#210) (e26a78c)
  • deps: bump dotenv from 14.3.0 to 14.3.2 (#214) (2bf911f)
  • deps: bump dotenv from 14.3.2 to 15.0.0 (#217) (b632823)
  • deps: bump dotenv from 15.0.0 to 16.0.0 (#223) (d0a1889)

Chore

2.0.1 (2022-01-12)

Build

  • deps-dev: bump @commitlint/cli from 16.0.0 to 16.0.1 (#180) (cfc323d)
  • deps-dev: bump @commitlint/cli from 16.0.1 to 16.0.2 (#192) (bdec13b)
  • deps-dev: bump @types/jest from 27.0.3 to 27.4.0 (#181) (8652780)
  • deps-dev: bump @types/node from 17.0.5 to 17.0.7 (#184) (254e6ad)
  • deps-dev: bump @types/node from 17.0.7 to 17.0.8 (#189) (214bdda)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#186) (05a51a7)
  • deps-dev: bump @typescript-eslint/eslint-plugin (#193) (063fbd6)
  • deps-dev: bump @typescript-eslint/parser from 5.8.1 to 5.9.0 (#187) (bc96c48)
  • deps-dev: bump @typescript-eslint/parser from 5.9.0 to 5.9.1 (#194) (adcb4bb)
  • deps-dev: bump eslint from 8.5.0 to 8.6.0 (#182) (dac8267)
  • deps-dev: bump eslint-plugin-import from 2.25.3 to 2.25.4 (#183) (e0052c4)
  • deps-dev: bump jest from 27.4.5 to 27.4.7 (#188) (38f9214)
  • deps-dev: bump lint-staged from 12.1.4 to 12.1.5 (#185) (2b039d1)
  • deps-dev: bump lint-staged from 12.1.5 to 12.1.6 (#190) (122d2e6)
  • deps-dev: bump lint-staged from 12.1.6 to 12.1.7 (#191) (d8fadef)
  • deps: bump dotenv from 10.0.0 to 11.0.0 (#195) (169f0a3)
  • simplify Makefile commands (02be710)
  • simplify ts config (896aacf)
  • use codecov action (74407d1)

Refactor

  • add tslib (bbdac09)
  • upgrade deps + add more entries to changelog + change lint and format commands (712928b)

2.0.0 (2021-12-28)

⚠ BREAKING CHANGES

  • eslint upgrade + remove some ts configs

Features

  • upgrade deps + ci config (52585be)

1.2.2 (2021-10-08)

1.2.1 (2021-08-10)

1.2.0 (2021-07-24)

Features

  • change ts config to es2020 + upgrade docs and add + badges + add types to pkg.json (e234ebb)

1.1.0 (2021-07-20)

Features

  • add docker compose dev env (ba4db1c)

1.0.0 (2021-07-20)

Features

  • add base Makefile (3002aac)
  • add base structure for Jest (0e77cb5)
  • add basic tooling (85f6efa)
  • add eslint (1910863)
  • add new simpler boilerplate and publish scripts (309bcd9)
  • add nodemon with dotenv and sample .env file (3750a60)
  • add simple hello world with Fastify along with utils code (54f31a3)
  • add typescript (30e4f53)

Bug Fixes