Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
supervizer
Advanced tools
A NodeJS manager to spawn/stop/manage node application.
supervizer list
supervizer monit
supervizer get myApp
supervizer-master
To install node supervizer module from npm repository :
npm install -g supervizer
Or from source:
git clone git://github.com/oOthkOo/supervizer.git
cd supervizer
npm link -g
And run this command to start supervizer master server :
supervizer-server
To install supervizer master as a daemon/service :
On Linux :
With Sysvinit - (https://help.ubuntu.com/community/UbuntuBootupHowto).
With Upstart - (http://upstart.ubuntu.com/getting-started.html).
With Systemd - (https://wiki.ubuntu.com/SystemdForUpstartUsers).
To make your nodeJS Application fully compatible with Supervizer, you must follow this code example to retrieve host and port parameters :
var host = process.argv[2] || '0.0.0.0';
var port = process.argv[3] || '5000';
For example, if you use expressjs framework :
var express = require('express');
var server = express();
server.use(express.static(__dirname + '/public'));
server.use(express.logger());
server.get('/', function(req, res) {
res.end('Hello word!');
});
server.get('*', function(req, res) {
res.send('Not Found!', 404);
});
server.use(function(err, req, res, next) {
res.send(500, 'Something broke!');
console.error(err.stack);
});
var host = process.argv[2] || '0.0.0.0';
var port = process.argv[3] || '5000';
server.listen(port, host);
console.log('Listening on port ' + port);
Add your application :
supervizer add --name myApp --group myGroup --script /path/to/script.js
--host localhost --port 3000 --watch /path/to/watch --log /path/to/logfile.log
Start your application :
supervizer start --name myApp
Stop your application :
supervizer stop --name myApp
Update your application parameters :
supervizer set myApp --port 3001
Save all your applications :
supervizer save --config /path/to/apps.json
Load all your applications :
supervizer load --config /path/to/apps.json
Start all your applications :
supervizer startAll
Start all applications by group:
supervizer startAll --group myGroup
Disable your application :
supervizer disable myApp
Enable authentication mode :
supervizer secure enable --auth myNewUserName:myNewPassword
Restart your application with authentication :
supervizer restart --name myApp --auth myUserName:myPassword
Disable authentication mode :
supervizer secure disable --auth myUserName:myPassword
Update your credentials :
supervizer secure disable --auth myOldUserName:myOldPassword
supervizer secure enable --auth myNewUserName:myNewPassword
supervizer [command] <options>
Commands:
install install supervizer as daemon
uninstall uninstall supervizer as daemon
load load all applications from a JSON config file
save save all applications to a JSON config file
add add an application
remove remove an application
start start an application
startAll start all applications
stop stop an application
stopAll stop all applications
restart restart an application
restartAll restart all applications
list list all applications
monit monitor all applications
secure create/update/remove security authentication
enable <name> enable an application
enableAll enable all applications
disable <name> disable an application
disableAll disable all applications
set <name> setting application property value
get <name> getting application properties values
Options:
-h, --help output usage information
-V, --version output the version number
-v --verbose display verbose data
-n --name <string> specify application name
-z --env <string> specify comma separated environment variables
-x --params <string> specify node command line extra parameters
-r --run <user:group> specify user uid:gid to run application
-g --group <string> specify application group
-s --script <path> specify application main script
-l --log <file> specify application log output file
-t --pid <file> specify application pid file
-k --keep <yes/no> keep alive application (default:yes)
-t --attempt <number> max restart to keep alive (default:3)
-w --watch <path> specify path to watch
-e --exclude <regex,regex> specify regexes to exclude paths
-h --host <address> specify address to bind
-p --port <port> specify port to bind
-a --auth <user:password> specify user/password to use
-c --config <file> specify JSON config file to load/save
Supervizer master server has an RESTfull HTTP interface wich allow you to control it remotely ;-)
COMMANDs | VERBs | URIs | Descriptions |
---|---|---|---|
GET | / | Show server banner | |
load | POST | /config/load | Load all applications from file |
save | POST | /config/save | Save all applications to file |
add | PUT | /apps | Add an application to run |
remove | DELETE | /apps | Stop and Remove an application |
start | POST | /app/start | Start an application |
startAll | POST | /apps/start | Start all applications |
stop | POST | /app/stop | Stop an application |
stopAll | POST | /apps/stop | Stop all applications |
restart | POST | /app/restart | Restart an application |
restartAll | POST | /apps/restart | Restart all applications |
list | POST | /apps/list | List all applications |
monit | POST | /apps/monit | Monitor all applications |
list | POST | /secure | enable/disable authentication |
enable | POST | /app/enable | Enable an application |
enableAll | POST | /apps/enable | Enable all applications |
disable | POST | /app/disable | Disable an application |
disableAll | POST | /apps/disable | Disable all applications |
set | POST | /app | Set an application property |
get | GET | /app | Get an application property |
Theses commands actually doesn't work, but you can install easily Supervizer master as a service by Systemd, Upstart, Sysvinit or other.
* install
* uninstall
FAQs
The most simple NodeJS application manager with RESTful API.
The npm package supervizer receives a total of 0 weekly downloads. As such, supervizer popularity was classified as not popular.
We found that supervizer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.