Skip to content

Leo-Henrique/create-nodejs-app

Repository files navigation

@leo-h/create-nodejs-app

Script usage example

Create a Node.js application with TypeScript with just one command and without worrying about environment or framework configurations. Dedicate your energy only to the business rules of your application.

Get started

With NPM:

npm create @leo-h/nodejs-app

With Yarn:

yarn create @leo-h/nodejs-app

With PNPM:

pnpm create @leo-h/nodejs-app

CLI

You can create the project non-interactively through the CLI. Arguments or options not provided will still be asked if it is mandatory information for creation.

Usage: @leo-h/create-nodejs-app [options] [project-directory]

Arguments:
  project-directory                    Name of the project or relative path of the project considering where the script was called.

Options:
  -pm, --package-manager <package-manager>  Package manager that will be used in the project.
  -t, --template <template-name>       Template that will be used in the project.
  -f, --framework <framework-name>     Framework that will be used in the project.
  -h, --help                           display help for command

Features

  • Fast: All templates use either esbuild or SWC to compile and build TypeScript. Both are extremely fast and are used by tools like Vite (esbuild) and Next.js (SWC).

  • Lint and code format: All templates use eslint to identify problems in the code and prettier to ensure consistent code formatting. Both are integrated with husky and lint-staged to automatically run them before every commit you make with git.

  • Tests: To encourage the use of tests, all templates already have a pre-configured unit testing setup with Vitest. The API templates also come with integration testing examples, including all utility tools like Supertest and Faker.js.