I'm very newbie in this thing. I would like to create a command line interface for my application where I can specify custom commands something like these:
myapp new /root/myapp
myapp start /server.js
myapp stop /server.js
So i can interact with my application just like I do with a real service like mysql. Is it possible to write such a service like thing inside node.js?
What I'm looking for something similar to forever or meteor in terms of working with them.
Thanks for any help!
You need to specify myapp in package.json like so:
{ "name": "myapp"
, "version": "0.0.1"
, "engines": [ "node >=0.4.0" ]
, "description": "myapp command line util."
, "author": "..."
, "contributors": []
, "keywords" : [ "myapp", "command", "shell" ]
, "repository":
{ "type" : "git"
, "url" : "https://...."
}
, "bin" : { "myapp" : "./bin/myapp.js" }
}