diff --git a/package.json b/package.json index 63b0d8d..dd0e259 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "color-interpolate": "^1.0.2", "d3": "^4.12.0", "dateformat": "^3.0.2", + "isomorphic-fetch": "^2.2.1", "koa": "^2.6.2", + "koa-cors": "0.0.16", "koa-router": "^7.4.0", "koa-static": "^5.0.0", "msgflo-browser": "^0.2.0", diff --git a/server/index.js b/server/index.js index 7730ae6..8714466 100644 --- a/server/index.js +++ b/server/index.js @@ -1,12 +1,14 @@ const Koa = require('koa'); const Router = require('koa-router'); const Static = require('koa-static'); +const Cors = require('koa-cors'); const path = require('path'); const app = new Koa(); const router = new Router(); app + .use(Cors()) .use(router.routes()) .use(router.allowedMethods()) .use(Static(path.resolve(__dirname, '../dist'), {}));