feat: V2 with TypeScript
This commit is contained in:
13
server/src/utils/app.ts
Normal file
13
server/src/utils/app.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import express from 'express'
|
||||
import cors from 'cors'
|
||||
import { ORIGIN } from '../constants/index'
|
||||
|
||||
// initialize app
|
||||
const app = express()
|
||||
|
||||
// middlewares
|
||||
app.use(cors({ origin: ORIGIN }))
|
||||
app.use(express.json()) // body parser
|
||||
app.use(express.urlencoded({ extended: false })) // url parser
|
||||
|
||||
export default app
|
||||
Reference in New Issue
Block a user