Skip to content

Commit

Permalink
Enable CORS and remove unnecessary static call
Browse files Browse the repository at this point in the history
  • Loading branch information
coryhouse committed Oct 23, 2016
1 parent fd1593f commit 1d50b3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
var express = require('express');
var cors = require('cors');

const app = express();
app.use(cors());

app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));

app.get('/', function(request, response) {
response.send('Hello World!')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start": "node index.js"
},
"dependencies": {
"cors": "2.8.1",
"express": "4.13.3"
},
"engines": {
Expand Down

0 comments on commit 1d50b3b

Please sign in to comment.