fixed runtime error on start node js server on old version of node.js
This commit is contained in:
+13
-8
@@ -44,11 +44,16 @@ handle["/loadBin"] = handlers.loadBin;
|
|||||||
handle["/control"] = handlers.control;
|
handle["/control"] = handlers.control;
|
||||||
handle["/other"] = handlers.other;
|
handle["/other"] = handlers.other;
|
||||||
|
|
||||||
/*fs.access(executeShell, fs.F_OK, function (error) {
|
if (typeof fs.access == "function") {
|
||||||
if (!error) {
|
fs.access(executeShell, fs.F_OK, function (error) {
|
||||||
server.start(router.route, handle);
|
if (!error) {
|
||||||
} else {
|
server.start(router.route, handle);
|
||||||
console.log("file " + executeShell + " not found. Copy this file to server root dir");
|
} else {
|
||||||
}
|
console.log("file " + executeShell + " not found. Copy this file to server root dir");
|
||||||
});*/
|
}
|
||||||
server.start(router.route, handle);
|
});
|
||||||
|
} else {
|
||||||
|
console.log("warning: you have old version of node.js. Check existence of the file st-flash on root of server dir yourself");
|
||||||
|
server.start(router.route, handle);
|
||||||
|
}
|
||||||
|
// server.start(router.route, handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user