A collection of clients and utilities for interacting with tubes.io services via Node JS.
The tubes.io library for node is a collection of clients and utilities for interacting with tubes.io services. The library consists of two parts:
curl http://npmjs.org/install.sh | sh
[sudo] npm install -g tubesio
A command-line interface for interacting with the tubes.io API.
The tubes.io CLI simplifies the process of environment setup and subsequent management of hub scripts deployed on tubes.io.
Create a working directory where your scripts will live:
$ mkdir my_username && cd my_username
$ tubesio init
This command will prompt you for your tubes.io username and API key. Your API key can be found on the edit profile page once logged in over at tubes.io.
This will download both the necessary and available libraries for your script once deployed.
The current feature set is quite limited. Only automated deployments are supported which means you will need to copy/paste existing scripts from tubes.io to your local environment. Creating new tubes must also be done from the tubes.io website.
By convention scripts should be named
<slug>.js where slug
is the slugified version of your tube's name. For example if your
tube's name is My 1st Tube then your script name should be
my-1st-tube.js. This generally means replacing spaces and
special charachters with dashes. If you're unsure of what your
tube's slug name is you should take a look at your tube's endpoint.
The slug will be the portion after the last "/" and before the format
".json" (e.g. http://tubes.io/username/tube/my-1st-tube.json)
Once you've copied your hub down into your local work directory you can deploy by running:
$ tubesio deploy my-1st-tube
A word of warning: The change will take effect immediately. In case you need to rollback, a backup of the previous script is created with the .bak extension in your working directory. This can be deployed using the
-fswitch to specify an alternate file to use instead of the default. For example:
$ tubes.io deploy -f my-1st-tube.js.bak my-1st-tube