diff --git a/index.js b/index.js index 0eef7cd..05ecfd1 100644 --- a/index.js +++ b/index.js @@ -20,8 +20,11 @@ const eth = new Eth(provider); var express = require('express'), cors = require('cors'), - app = express(); + app = express(), + bodyParser = require('body-parser'), + jsonParser = bodyParser.json(); +app.use(jsonParser); app.use(cors()); // Receive a POST request at the address specified by an env. var. diff --git a/package.json b/package.json index 5a0e4e6..c1ba9e8 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "author": "", "license": "ISC", "dependencies": { + "body-parser": "^1.17.2", "cors": "^2.8.1", "ethjs-provider-signer": "^0.1.4", "ethjs-query": "^0.2.4",