diff --git a/index.js b/index.js index e2e378a..f7281c6 100644 --- a/index.js +++ b/index.js @@ -3,11 +3,13 @@ require('newrelic'); var express = require('express'); var morgan = require('morgan'); +var cors = require('cors'); var bodyParser = require('body-parser'); var app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: true})); +app.use(cors()); morgan.token('body', function(req) { return JSON.stringify(req.body); diff --git a/package.json b/package.json index 82d865f..5464060 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,13 @@ "apicache": "0.0.12", "bluebird": "^2.9.3", "body-parser": "^1.10.1", + "cors": "^2.7.1", "express": "^4.11.0", "lodash": "^3.10.1", "morgan": "^1.5.1", + "newrelic": "^1.18.0", "node-twitter": "0.5.2", "superagent": "^0.21.0", - "validator": "^3.27.0", - "newrelic": "^1.18.0" + "validator": "^3.27.0" } }