Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions apps/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@ app.use("*", cors())

configureOpenAPI(app)

// Health check at root
app.route("/", index)

const routes = [waitlistRouter] as const
for (const route of routes) {
// Internal routes (not versioned)
const internalRoutes = [waitlistRouter] as const
for (const route of internalRoutes) {
app.route("/", route)
}

export type AppType = (typeof routes)[number]
// Versioned public API routes
const v1Routes = [] as const
for (const route of v1Routes) {
app.route("/v1", route)
}

const allRoutes = [...internalRoutes, ...v1Routes] as const

export type AppType = (typeof allRoutes)[number]

export default app