mirror of https://github.com/embarklabs/embark.git
Add back console command
This commit is contained in:
parent
ae029a5959
commit
c453a85dde
|
@ -24,6 +24,16 @@ class Console {
|
|||
this.events.setCommandHandler("console:history", (cb) => this.getHistory(process.env.DEFAULT_CMD_HISTORY_SIZE, cb));
|
||||
this.registerEmbarkJs();
|
||||
this.registerConsoleCommands();
|
||||
this.registerApi();
|
||||
}
|
||||
|
||||
registerApi() {
|
||||
let plugin = this.plugins.createPlugin('consoleApi', {});
|
||||
plugin.registerAPICall('post', '/embark-api/command', (req, res) => {
|
||||
this.executeCmd(req.body.command, (_err, result) => {
|
||||
res.send({result});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
processEmbarkCmd (cmd) {
|
||||
|
|
Loading…
Reference in New Issue