cors
This commit is contained in:
@@ -2,11 +2,14 @@ import * as express from 'express'
|
||||
import * as bodyParser from 'body-parser'
|
||||
import routes from './routes/index'
|
||||
import { createConnection } from 'typeorm'
|
||||
import * as cors from 'cors'
|
||||
|
||||
const PORT = 3000
|
||||
createConnection()
|
||||
.then(async (connection) => {
|
||||
const app = express()
|
||||
// configure multer
|
||||
app.use(cors())
|
||||
app.use(bodyParser.urlencoded({ extended: false }))
|
||||
app.use(bodyParser.json())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user