Fix error preventing calendar images from being created
parent
c22e9c4c53
commit
c884bd9c77
|
|
@ -30,6 +30,7 @@ router.get('/cim/:month/:day',function(req,res){
|
||||||
res.sendFile(file);
|
res.sendFile(file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(process.platform);
|
||||||
if (process.platform != 'win32'){
|
if (process.platform != 'win32'){
|
||||||
child = execFile(dir + '/calendar_image_maker/bin/phantomjs', [dir + '/calendar_image_maker/script.js', req.params.month, req.params.day], (error, stdout, stderr) => {
|
child = execFile(dir + '/calendar_image_maker/bin/phantomjs', [dir + '/calendar_image_maker/script.js', req.params.month, req.params.day], (error, stdout, stderr) => {
|
||||||
console.log("MAKE");
|
console.log("MAKE");
|
||||||
|
|
@ -43,8 +44,10 @@ router.get('/cim/:month/:day',function(req,res){
|
||||||
res.error("Error");
|
res.error("Error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
res.send("WIN");
|
||||||
}
|
}
|
||||||
res.send("WIN");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
Loading…
Reference in New Issue