Open simonexmachina opened 9 years ago
Good news @aexmachina, ndm should already do the trick for you. Either:
foo
:{
"foo": {
"args" {
},
"env": {
}
}
}
Here's an example of this in the wild:
https://github.com/npm/download-counts/blob/master/service.json
If you have no need to pass in env
and args
variables, the default behavior of ndm is to use package.json
.
Let me know if this solves your problem.
That's great, thanks. That has generated the correct plist file.
However now I have another problem: when I run ghostrunner install
as simonwade
(which calls ndm.install()
) it creates the logs/
directory with an owner of root
, and the service won't start until I sudo chown logs simonwade
. Any ideas.
Not sure if it's relevant but the ghostrunner
script is owned by simonwade
, not root
:
$ ls -al `which ghostrunner`
lrwxr-xr-x 1 simonwade admin 42 4 Jan 22:52 /usr/local/bin/ghostrunner -> ../lib/node_modules/ghostrunner/lib/cli.js
@aexmachina what's the path to the logs directory in question? I'm surprised that it would have created it as root
unless you'd installed using sudo
.
I think it defaults to logging to HOME/Library/Logs/
?
If you don't mind, could you open a new ticket that describes this behavior in detail and I'll dig into it.
At what point would you expect the log directory to be created? I can't reproduce the issue now.
It would be great to be able to use ndm on the containing module. I want to be able to use ndm to create service wrappers for the module itself, rather than modules in node_modules. Obviously I can use a wrapper module but this isn't a good solution for my use case.