Externalised JavaScript configuration

Nick Houghton, February 21 2016


Config!

A feature users have been asking for in different ways for a while was a way to make their Sandboxes more configurable, to be able to describe their Sandboxes logic in JavaScript but not have to keep updating and tweaking it to change environment style values. Our new feature Sandbox.config solves this problem!

The new config feature is already live, and the details of how it works are here - config properties.

It is super simple, all the config values configured via the UI or API are exposed to your JavaScript as a JS map object on the Sandbox object. A simple example would be:

Sandbox.define('/test', 'GET', function(req, res) {
  return res.send(Sandbox.config.responseText)

})

Hit us up with any feedback, or raise a ticket on GitHub.