adding node version and write access checks

v0.2.5
Suresh Alse 2017-02-26 01:14:09 -08:00
parent 5048fa6a3f
commit 2b87cb34ea
2 changed files with 8 additions and 1 deletions

7
app.js
View File

@ -185,6 +185,13 @@ app.use(function(err, req, res, next) {
});
app.listen(app.get('port'), function() {
console.log("Node version:", process.versions.node);
fs.access(__dirname + "/crontabs/", fs.W_OK, function(err) {
if(err){
console.error("Write access to", __dirname + "/crontabs/", "DENIED.");
process.exit(1);
}
});
// If --autosave is used then we will also save whatever is in the db automatically without having to mention it explictly
// we do this by watching log file and setting a on change hook to it
if (process.argv.includes("--autosave")){

View File

@ -1,6 +1,6 @@
{
"name": "crontab-ui",
"version": "0.2.4",
"version": "0.2.5",
"description": "Easy and safe way to manage your crontab file",
"main": "index.js",
"scripts": {