mirror of
https://github.com/status-im/autobounty.git
synced 2025-01-26 21:51:01 +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'),
|
||||
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.
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user