node-forever json config支持所有选项?

时间:2017-05-22 01:42:07

标签: json node.js forever

我尝试使用json配置永远运行,但有些配置似乎不起作用。我想知道我的代码是错误的,还是只支持--xxx--minUptime命令,-xxx-m之外的. ├── forever │ └── proConfig.json └── test_debug.js // config.json { "append": true, "watch": true, "script": "test_debug.js", "minUptime": "100ms", "spinSleepTime": "10000ms", // ------------------------- "MAX": 10, "LOGFILE": "forever.log", "OUTFILE": "out.log", "ERRFILE": "err.log" } 命令。

forever start forever/proConfig.json

命令:

var initialPos, finalPos;

$("#sortable")
  .sortable()
  .on("sortstart", function( event, ui ) {
     initialPos = ui.item.index() + 1; // when using a 1-based index    
     //console.log("Item started at position", initialPos);
  })  
  .on("sortupdate", function( event, ui ) {
     finalPos =  ui.item.index() + 1; // when using a 1-based index  	
     console.log(ui.item.attr('id'), "moved from position", initialPos, "to", finalPos);
    
     // call ajax function here, passing in initialPos & finalPos
     // server will need to re-order values for all elements between (and including) initialPos & finalPos
  });

1 个答案:

答案 0 :(得分:0)

首先,您应该检查命令行用法。它应低于命令:

forever start forever/proConfig.json

其次,永远不支持配置文件中的minUptimespinSleepTime,....请尝试将其添加到命令中:

forever start --minUptime 1000 --spinSleepTime 1000 forever/proConfig.json