Skip to content

Commit

Permalink
Add baseApp.options
Browse files Browse the repository at this point in the history
  • Loading branch information
chromium-52 committed Jan 18, 2024
1 parent 509d8fb commit 487edb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/monarch/monarch-backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ import { Request, Response } from 'express';
// Need to use base Express in order for compat with serverless-express
// See: https://github.com/ecyrbe/zodios-express/issues/103
export const baseApp = express();
baseApp.use(cors());
baseApp.options('*', cors());

export const app = zodiosApp(userApi, { express: baseApp });
export const handler = serverlessExpress({ app: baseApp });

app.use(cors());

// Composition Root
const getAllPractitionersHandler = async () =>
getAllPractitioners(scanAllPractitioners);
Expand Down

0 comments on commit 487edb0

Please sign in to comment.