mirror of
https://github.com/status-im/autobounty.git
synced 2025-01-27 14:05:06 +00:00
Adding body-parser to parse JSON
This commit is contained in:
parent
b750bbfda3
commit
3932bbbe10
5
index.js
5
index.js
@ -20,8 +20,11 @@ const eth = new Eth(provider);
|
|||||||
|
|
||||||
var express = require('express'),
|
var express = require('express'),
|
||||||
cors = require('cors'),
|
cors = require('cors'),
|
||||||
app = express();
|
app = express(),
|
||||||
|
bodyParser = require('body-parser'),
|
||||||
|
jsonParser = bodyParser.json();
|
||||||
|
|
||||||
|
app.use(jsonParser);
|
||||||
app.use(cors());
|
app.use(cors());
|
||||||
|
|
||||||
// Receive a POST request at the address specified by an env. var.
|
// Receive a POST request at the address specified by an env. var.
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"body-parser": "^1.17.2",
|
||||||
"cors": "^2.8.1",
|
"cors": "^2.8.1",
|
||||||
"ethjs-provider-signer": "^0.1.4",
|
"ethjs-provider-signer": "^0.1.4",
|
||||||
"ethjs-query": "^0.2.4",
|
"ethjs-query": "^0.2.4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user