move console api call into console

This commit is contained in:
Iuri Matias 2018-03-13 06:46:58 -04:00 committed by Pascal Precht
parent 26d7e42218
commit 9ed4922367
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
2 changed files with 5 additions and 14 deletions

View File

@ -8,6 +8,7 @@ require('http-shutdown').extend();
var express = require('express'); var express = require('express');
let path = require('path'); let path = require('path');
var expressWebSocket = require('express-ws'); var expressWebSocket = require('express-ws');
var bodyParser = require('body-parser');
class Server { class Server {
constructor(options) { constructor(options) {
@ -65,6 +66,9 @@ class Server {
this.app.use('/coverage', coverage); this.app.use('/coverage', coverage);
this.app.use(coverageStyle); this.app.use(coverageStyle);
app.use(bodyParser.json()); // support json encoded bodies
app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies
expressWebSocket(this.app); expressWebSocket(this.app);
this.app.ws('/logs', function(ws, req) { this.app.ws('/logs', function(ws, req) {

View File

@ -54,8 +54,8 @@
"eth-ens-namehash": "2.0.8", "eth-ens-namehash": "2.0.8",
"eth-lib": "0.2.8", "eth-lib": "0.2.8",
"babel-plugin-webpack-aliases": "^1.1.3", "babel-plugin-webpack-aliases": "^1.1.3",
"body-parser": "^1.18.2",
"ethereumjs-wallet": "0.6.0", "ethereumjs-wallet": "0.6.0",
<<<<<<< HEAD
"express": "4.16.3", "express": "4.16.3",
"express-ws": "4.0.0", "express-ws": "4.0.0",
"file-loader": "2.0.0", "file-loader": "2.0.0",
@ -72,19 +72,6 @@
"http-proxy": "1.17.0", "http-proxy": "1.17.0",
"http-shutdown": "1.2.0", "http-shutdown": "1.2.0",
"i18n": "0.8.3", "i18n": "0.8.3",
=======
"express": "^4.16.2",
"express-ws": "^3.0.0",
"file-loader": "^1.1.5",
"finalhandler": "^1.1.1",
"follow-redirects": "^1.2.4",
"fs-extra": "^2.0.0",
"ganache-cli": "^6.1.6",
"glob": "^7.1.2",
"globule": "^1.1.0",
"hard-source-webpack-plugin": "^0.11.1",
"http-proxy": "^1.17.0",
>>>>>>> add 2nd endpoint to webserver; use express
"handlebars": "^4.0.11", "handlebars": "^4.0.11",
"ipfs-api": "17.2.4", "ipfs-api": "17.2.4",
"is-valid-domain": "0.0.5", "is-valid-domain": "0.0.5",