trboss
v1.0.10
Published
Trbo (SS) lets you run server-side js straight from Trbo's editor.
Downloads
5
Readme
NOTE THAT THIS SOFTWARE IS STILL BEING TESTED
For use with Trbo editor + JS task runner
Trbo is an editor + client-side js task runner that runs in the browser.
TrboSS (Trbo Server-Side) lets you run server-side js straight from the Trbo editor.
Install
cd into your project root.
$ npm install trboss
Run
cd down to node_modules/trboss
$ node trboss.js
You should see
Running trboSS
This has fired up trboSS and it's now listening for commands from Trbo.
Control from the Trbo editor
Use the trboss()
function to send commands to trboSS.
trboss()
takes an object with Do: ['array', 'of', 'commands']
For example:
- trboss({Do: ['thing1', 'thing2']});
The above example will tell trboss to Do thing1 and thing2
Configuring trboss.js with tasks
Within the trboss.js file you can add tasks for trboss to perform.
A task taskes the following format:
orchestrator.add('thing1', function(){
console.log("doing thing 1");
});
trboSS uses Orchestrator to execute it's tasks, so you can look there for more detail.
There are three example tasks already loaded:
orchestrator.add('thing1', function(){
console.log("doing thing 1");
});
orchestrator.add('thing2', function(){
console.log("doing thing 2")
});
orchestrator.add('thing3', function(){
console.log("doing thing 3 - yay")
});
So when you run - trboss({Do: ['thing1', 'thing2']});
from the Trbo editor, this will run thing1 and thing2
and console log "doing thing 1" and "doing thing 2".