Skip to content

Commit

Permalink
Add cors support
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Dec 25, 2020
1 parent bd04232 commit e18cea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const cors = require('cors');
const http = require('http')
const morgan = require('morgan')
const express = require('express')
Expand Down Expand Up @@ -80,7 +81,7 @@ app.post('/update', (req, res, next) => {
res.status(200).send();
})

app.get('/catalogue.json', (req, res, next) => {
app.get('/catalogue.json', cors(), (req, res, next) => {
res.send(catalogue)
})

Expand Down

0 comments on commit e18cea1

Please sign in to comment.