update service and category

This commit is contained in:
2024-11-11 18:55:24 +07:00
parent 705c4b53d8
commit e0a8b0aaa0
8 changed files with 130 additions and 20 deletions

View File

@@ -73,20 +73,34 @@ async function bootstrap() {
},
}
// clerk middleware
app.use(clerkMiddleware({}))
try {
// clerk middleware
app.use(clerkMiddleware({}))
// graphql upload
app.use(
graphqlUploadExpress({
maxFileSize: 100 * 1024 * 1024, // 100 MB
maxFiles: 10,
}),
)
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
} catch (error: any) {
Logger.error(
`Error in file upload middleware: ${error.message}`,
'Bootstrap',
)
// Optionally, you can handle the error further or rethrow it
}
// graphql upload
app.use(
graphqlUploadExpress({
maxFileSize: 100 * 1024 * 1024, // 100 MB
maxFiles: 10,
}),
)
const host = process.env.LISTEN_HOST ?? '0.0.0.0'
const port = process.env.LISTEN_PORT ?? 3000 // Default to 3000 if LISTEN_PORT is not set
await app.listen(port, host, () => {
Logger.log(`Server is running on http://${host}:${port}`, 'Bootstrap')
})
}
bootstrap()
// IIFE
;(async () => {
await bootstrap()
})()