import { serve } from "bun"
import { nanoRemix } from "nano-remix"
import { join } from "node:path"

serve({
  routes: {
    "/*": (req) => nanoRemix(req, { routesDir: join(import.meta.dir, "routes") }),
  },

  development: process.env.NODE_ENV !== "production" && {
    hmr: true,
    console: true,
  },
})
