Initial commit
This commit is contained in:
16
apps/backend/src/server.ts
Normal file
16
apps/backend/src/server.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import app from '@/index'
|
||||
import { logger } from '@/lib/logger'
|
||||
|
||||
const port = Number(Bun.env.PORT ?? 3000)
|
||||
const hostname = Bun.env.HOST ?? '0.0.0.0'
|
||||
|
||||
const server = Bun.serve({
|
||||
hostname,
|
||||
port,
|
||||
fetch: app.fetch,
|
||||
})
|
||||
|
||||
logger.info(
|
||||
{ url: `http://${server.hostname}:${server.port}` },
|
||||
'backend_listening',
|
||||
)
|
||||
Reference in New Issue
Block a user