Skip to content
Gaël Métais edited this page Jan 8, 2015 · 17 revisions

Yellow Lab Tools is build around a core, which is a NodeJS module. The server uses the core, the CLI uses the core, and you can use if also if none of them fits your needs.

Don't hesitate to contact us before coding, your need could be the need of the many. So adding the functionality directly into YLT would probably be great.

Add the module inside your NodeJS project

npm install yellowlabtools --save

Example

The core returns a promise you can use this way:

var ylt = require('../lib/index');

ylt(urlToTest).

    then(function(data) {

        console.log('Success');
        console.log(JSON.stringify(data, null, 2));

    }).fail(function(err) {
        
        console.log('Test failed for url: ' + url);
        console.error(err);
        
    });

Options

no options for the moment

Result

The data attribute provided in the .then() is the entire JSON response.
See the JSON output format here.