I am trying to write jenkins shell script to deploy nestjs app, I try "npm run start:prod" this generate dist folder, but it serve also the app which I dont need it,
How to just build the app ?
Nest. JS is a framework that helps build Node. JS server-side applications. The Nest framework is built using TypeScript which allows developers to build highly scalable and testable applications.
NestJS is a Node. js framework for building server-side applications. It is based on TypeScript and JavaScript. This framework is inspired by Angular, so most of what you find in Angular can also be found in Nest, including providers, middleware, components, and services.
You can run:
npm run build
This will just build application. This script can be found in generated Nest.js project when you generate project with Nest CLI.
The script itself could look like this:
"build": "tsc -p tsconfig.build.json"
And content of tsconfig.build.json
could look like this:
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "**/*spec.ts"]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With