Skip to content

Get Netbeast router configuration

Luis edited this page Oct 27, 2015 · 2 revisions

Sometimes you may want to get Netbeast router configuration, to check where are the apps installed or the port it is running. Even where are the public assets stored.

To do so you only need to perform a GET request on http://<Netbeast router ip>/config.

For example we used this feature with the Market App. We used request-sync but you could use any other npm package as request is.

var requestSync = require('sync-request');
[...]
var config = JSON.parse(requestSync('GET', 'http://localhost/config').getBody());

Resulting in:

{"port":3000,"appsDir":"/Users/jdario/Development/nb-dashboard/sandbox","tmpDir":"/Users/jdario/Development/nb-dashboard/tmp","publicDir":"/Users/jdario/Development/nb-dashboard/public"}

To see which routes are available you can visit http://home.netbeast/#/routes at your running router.

Clone this wiki locally