diff --git a/dmx-web.js b/dmx-web.js index cbe6db5..90b9714 100755 --- a/dmx-web.js +++ b/dmx-web.js @@ -56,6 +56,15 @@ function DMXWeb() { res.sendfile(__dirname + '/index.html') }) + app.get('/config', function(req, res) { + var response = {"devices": DMX.devices, "universes": {}} + Object.keys(config.universes).forEach(function(key) { + response.universes[key] = config.universes[key].devices + }) + + res.json(response) + }) + app.get('/state/:universe', function(req, res) { if(!(req.params.universe in dmx.universes)) { res.status(404).json({"error": "universe not found"})