简体   繁体   English

PM2-使用NodeJS参数运行Coffeescript文件

[英]PM2 - Run Coffeescript file with NodeJS Parameters

I have a NodeJS app written in coffeescript that requires me to set the stack_size parameter in order for it to run correctly. 我有一个用coffeescript编写的NodeJS应用程序,需要我设置stack_size参数才能使其正确运行。 The command looks like this to get it running. 该命令如下所示以使其运行。

coffee --nodejs --stack_size=65000 app.coffee

Now I'd like to integrate this in to PM2, but can't figure out how to add a parameter like stack_size. 现在,我想将其集成到PM2中,但无法弄清楚如何添加类似stack_size的参数。 How would I go about it? 我将如何处理?

There you go: 你去了:

pm2 start app.coffee --node-args="--max-stack-size=65000"

Documentation 文献资料

Note that since pm2@2.x you have to first install the coffee support: 请注意,从pm2@2.x开始,您必须先安装咖啡支持:

pm2 install coffeescript

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM