我尝试使用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
});
答案 0 :(得分:0)
首先,您应该检查命令行用法。它应低于命令:
forever start forever/proConfig.json
其次,永远不支持配置文件中的minUptime
,spinSleepTime
,....请尝试将其添加到命令中:
forever start --minUptime 1000 --spinSleepTime 1000 forever/proConfig.json