[英]How to start Nest.js application by using node cli command?
我一直在為 REST API 服務器開發 Nest.js 應用程序,我想通過使用 Node.js 分析工具進行一些性能分析。 我知道有幾種工具,如 WebStorm V8 CPU 和--prof
分析( https://www.jetbrains.com/help/webstorm/v8-cpu-and-memory-profiling.html#node_profiling_before_you_start )和節點.
但是,我不知道如何使用node
cli 程序啟動我的 Nest.js 應用程序,所以我不知道如何將這些分析工具應用到我的 Nest.js 應用程序中。
有什么方法可以將 Node.js 分析工具用於 Nest.js 應用程序? 或者對於 Nest.js 應用程序還有其他好的解決方案嗎?
提前致謝。
您可以使用nest build
構建應用程序,然后使用node --prof dist/main
運行它。 或者你可以使用nest start --watch -e 'node --prof'
這應該告訴 Nest 使用node --prof dist/main
作為啟動命令
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.