0.0.1 • Published 8 years ago
node-reign v0.0.1
reign
A simple web based control panel for node scripts.
Installation
npm install node-reign
Example Usage
const Reign = require('node-reign');
const reign = new Reign();
reign.start();
reign.add(test);
reign.add(returnFunction);
function test() {
console.log('test');
}
function returnFunction() {
return 'returned';
}
Documentation
Creating a new control panel
const Reign = require('node-reign');
const reign = new Reign([options]);
options are an object
{
port: 3000, //default is 3000
}
Methods
start()
Starts the control panel
add(function ,options)
Adds a new function to the control panel. Options are passed as an object
{
type: (button, range, toggle, text) //default is button
range: [min, max] //needed if type is range
}
0.0.1
8 years ago