简体   繁体   English

如何通过pm2启动actionhero

[英]how start actionhero by pm2

I'm starting actionhero by this command 我正在通过此命令启动actionhero

pm2 start .\\node_modules\\actionhero\\bin\\actionhero

But actionhero doesn't start successfully and this is in my pm2 log: 但是,actionhero无法成功启动,这在我的pm2日志中:

error: No config directory found in this project, specified with --config, or found in process.env.ACTIONHERO_CONFIG 错误:在此项目中找不到配置目录,使用--config指定或在process.env.ACTIONHERO_CONFIG中找不到

I have no experience with actionhero but it clearly says no config directory found. 我没有使用actionhero的经验,但显然没有找到配置目录。 Either 1. --config parameter has to be passed as next argument for pm2 start or 2. Set an env variable ACTIONHERO_CONFIG to appropriate value. 1.必须将--config参数作为pm2 start的下一个参数传递,或者2.将环境变量ACTIONHERO_CONFIG设置为适当的值。

Boot Options to find the Config Directory 引导选项以找到配置目录

When launching ActionHero you can specify which config directory to use with --config '/path/to/dir' or the environment variable ACTIONHERO_CONFIG, otherwise ./config/ will be used from your working directory.

The priority of arguments is:

Use the project's ./config folder, if it exists.
actionhero --config=PATH1 --config=PATH2 --config=PATH3,PATH4
ACTIONHERO_CONFIG=PATH1,PATH2 npm start
Note that if --config or ACTIONHERO_CONFIG are used, they overwrite the use of the default /config folder. If you wish to use both, you need to re-specify "config", e.g. --config=config,local-config. Also, note that specifying multiple --config options on the command line does exactly the same thing as using one parameter with comma separators, however the environment variable method only supports the comma-delimited syntax.

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

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