I would like to wrap my Hubot in a windows service to deploy it.
I am using node-windows to do this but I'm having some trouble trying to get it to run a coffee-script file (which is what hubot uses).
If i manually run
> coffee .\node_modules\hubot\bin\hubot
everything works fine.
But I cant work out how to call this from a node-windows script. My attempt below:
var Service = require('node-windows').Service;
var svc = new Service({
name:'Hubot',
description: 'Hubot',
script: 'coffee .\\hubot\\node_modules\\hubot\\bin\\hubot'
});
svc.on('install',function(){
svc.start();
});
svc.install();
which fails with the following:
C:\Users\luke.mcgregor\hubot>node app.js fs.js:747 return binding.mkdir(pathModule._makeLong(path), ^ Error: ENOENT, no such file or directory 'C:\Users\luke.mcgregor\hubot\coffee .\hubot\node_modules\hubot\bin\daemon' at Error (native) at Object.fs.mkdirSync (fs.js:747:18) at C:\Users\luke.mcgregor\AppData\Roaming\npm\node_modules\node-windows\lib\daemon.js:409:16 at FSReqWrap.cb [as oncomplete] (fs.js:226:19)