Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -2,11 +2,13 @@ | ... | @@ -2,11 +2,13 @@ |
2 | 2 | ||
3 | const express = require('express'); | 3 | const express = require('express'); |
4 | const app = express(); | 4 | const app = express(); |
5 | +const cors = require(cors); | ||
5 | 6 | ||
6 | const bodyParser = require('body-parser'); | 7 | const bodyParser = require('body-parser'); |
7 | app.use(bodyParser.urlencoded({extended : true})); | 8 | app.use(bodyParser.urlencoded({extended : true})); |
8 | app.use(express.json()); | 9 | app.use(express.json()); |
9 | 10 | ||
11 | +app.use(cors({ origin:true })); | ||
10 | app.listen(8080, function () { | 12 | app.listen(8080, function () { |
11 | console.log('listening on 8080') | 13 | console.log('listening on 8080') |
12 | }) | 14 | }) | ... | ... |
-
Please register or login to post a comment