Skip to content

Commit 9ffde9d

Browse files
committed
Supporting cors
1 parent f6e7308 commit 9ffde9d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"use strict";
33

44
var app,
5+
cors = require('cors'),
56
express = require('express'),
67
exphbs = require('express-handlebars'),
78
hbs,
@@ -47,6 +48,8 @@
4748

4849
app = express();
4950

51+
app.use(cors());
52+
5053
// Configure handlebars template engine to work with moment
5154
hbs = exphbs.create({
5255
helpers: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"dependencies": {
2020
"async": "^1.5.0",
2121
"body-parser": "^1.14.1",
22+
"cors": "^2.8.1",
2223
"express": "^4.13.3",
2324
"express-handlebars": "^2.0.1",
2425
"moment": "^2.10.6",

0 commit comments

Comments
 (0)