Based on API Specification, here is an example on how to interact with the service using AJAX API endpoint.

Performance issue
AJAX endpoint is not the best for issuing multiple commands back to back. Suggest users to explore WebSocket frameworks such as socket.io, if latency becomes an issue.
var rp          = require('request-promise'),
    r           = require('request'),
    JSONStream  = require('JSONStream'),
    es          = require('event-stream')

var BIGOBJECT_URL = 'http://localhost:9090/cmd'

function scan(res, callback) {
    r.post({
        url: BIGOBJECT_URL,
        json: true,
        body: {
            Stmt: 'SCAN ' + res,
            Workspace: '',
            Opts: ''
        }
    })
    .pipe(JSONStream.parse())
    .pipe(es.mapSync(function(data) {
        callback(data.Content.content)
    }));
}

function select(select_stmt, callback) {
    rp.post({
        url: BIGOBJECT_URL,
        json: true,
        body: {Stmt: select_stmt, Workspace: '', Opts: ''}
    })
    .then(function(resp) {
        if (resp.Content == null) {
            console.log(resp.Err);
        } else {
            scan(resp.Content.res, callback);
        }
    });
}

select('select * from sales', function(thing) {
    for (var idx = 0; idx < thing.length; idx++) {
        console.log(thing[idx])
    }
});