mirror of
https://github.com/get-drexa/drive.git
synced 2025-12-04 23:31:40 +00:00
20
packages/web/src/server.tsx
Normal file
20
packages/web/src/server.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { serve } from "bun"
|
||||
import index from "./index.html"
|
||||
|
||||
const server = serve({
|
||||
port: process.env.PORT || 3001,
|
||||
routes: {
|
||||
// Serve index.html for all unmatched routes.
|
||||
"/*": index,
|
||||
},
|
||||
|
||||
development: process.env.NODE_ENV !== "production" && {
|
||||
// Enable browser hot reloading in development
|
||||
hmr: true,
|
||||
|
||||
// Echo console logs from the browser to the server
|
||||
console: true,
|
||||
},
|
||||
})
|
||||
|
||||
console.log(`🚀 Server running at ${server.url}`)
|
||||
Reference in New Issue
Block a user