add console support to the api

This commit is contained in:
Iuri Matias 2018-02-28 19:00:02 -05:00
parent 308b403c48
commit c6112ed55e

View File

@ -61,6 +61,10 @@ class Server {
});
}
app.get('/embark/console', function (req, res) {
self.events.request('console:command', req.query.cmd, res.send.bind(res));
});
app.listen(this.port);
this.logger.info(__("webserver available at") + " " + ("http://" + canonicalHost(this.hostname) + ":" + this.port).bold.underline.green);