update service and category
This commit is contained in:
34
src/main.ts
34
src/main.ts
@@ -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()
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user