Home > front end >  How to start Nest.js application by using node cli command?
How to start Nest.js application by using node cli command?

Time:11-19

I has been developing a Nest.js application for a REST API server, and I want to do some performance analysis by using Node.js profling tools. I know that there are several tools like WebStorm V8 CPU and Memory Profiling (https://www.jetbrains.com/help/webstorm/v8-cpu-and-memory-profiling.html#node_profiling_before_you_start) and node cli option --prof.

However, I don't know how to start my Nest.js application by using node cli program, so I don't know how to apply these profiling tools to my Nest.js application.

Is there any way to use Node.js profling tools to Nest.js application? or is there any other good solutions for Nest.js application?

Thanks in advance.

CodePudding user response:

You could build the application using nest build and then run it using node --prof dist/main. Or you could just use nest start --watch -e 'node --prof' which should tell Nest to use node --prof dist/main for the start command

  • Related