Local development
Local development of TypeScript NestJS projects is very close to the native development of NestJS applications. To have a smooth development experience, it is required to ensure all Prerequisites and get to know the Scripts available in the project.
Prerequisites
IDE
IBM Industry Solutions Workbench is open to be used with every Integrated Development Environment (IDE) that suits the requirements of the specific language.
For the TypeScript NestJS stack the usage of Visual Studio Code is recommended.
Node.js
Currently, only Node.js 20 from version 20.11.1 is supported.
Further information: Node.js
Download link: Node.js Version20.x
ESLint
A tool used to check the quality of the code.
Further information: ES Lint
EditorConfig
This is used to overwrite the settings of the user workspace in VS Code (IDE).
Further information: Visual Studio Marketplace
VS Code plug-ins (optional)
- ESLint: Integrates ESLint JavaScript into VS Code.
- Gremlins tracker: Reveals some characters that can be harmful because they are invisible or looking like legitimate ones.
Scripts
Besides the commands available in the Solution CLI, there are various scripts provided within the project, which help to make local development easier. The scripts can be executed within the project using npm run <script-name>
.
Below you can find a list of the most important scripts for local development. To find a full list of the available scripts, please check the package.json
of your project.
build
: builds projectstart
: starts the service using the nest clistart:dev
: starts the service in watch modestart:debug
: starts the service in debug and watch modestart:prod
: starts the service from the built files indist
lint
: runs a lint checktest
: runs all tests in the project
Whenever it is required, you can adjust the scripts according to your needs.