This is a bare simple boilerplate. Feel free to clone it and use it as you want.
You can also click on the Use this template
button to create a new repo with the same structure.
In any case, feel free to use it as you want ๐๐
It comes with some packages pre-installed and configured:
- vitest for test running.
- tsx to execute TypeScript files.
- zod for schema validation.
- openapi-typescript to generate types from OpenAPI specs.
The boilerplate uses node 22.13.1
.
In case you don't have them install, you can
- use asdf which will install the right version based on the
.tool-versions
file. - head to the nodejs website and install it manually.
Create a .env
file at the root of the project with the following command:
cp -n .env.sample .env
Then install the dependencies:
npm install
To understand how the code is structured, you can read the internals documentation.
npm run build
## In local development mode
npm run dev
## In production mode
npm start
You can use eslint to help you format your code.
npm run lint
To run tests, you can use the following commands:
npm run test
## watch mode
npm run test:dev