Created
August 13, 2023 04:10
-
-
Save ColeMurray/37b0f0bee0295e16dc4546b65e9d153e to your computer and use it in GitHub Desktop.
source/app.ts from serverless express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from "express"; | |
import cors from "cors"; | |
import apiRoutes from "./api"; | |
import {errorResponder} from "./middleware/errorResponder"; | |
export const app = express(); | |
app.use(cors({origin: '*'})); | |
app.use(express.json()); | |
app.use(express.urlencoded({extended: true})) | |
app.use('/api/v1', apiRoutes); | |
app.use(errorResponder); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment