Skip to content

Astro requires an adapter #786

@Lippiece

Description

@Lippiece

What is the type of issue?

Example code is not working

What is the issue?

With output: "server" or simply using export const prerender = false, Astro requires an adapter.

As I can understand, Elysia supports the node adapter handler. I just don't know how to use it.

Hono example:

import { Hono } from "hono"
import { serveStatic } from "hono/bun" // Import the serveStatic from your favorite runtime
import { handler as ssrHandler } from "./dist/server/entry.mjs" // Import the handler from the built project

const app = new Hono()
app.use("/*", serveStatic({ root: "./dist/client/" })) // Serve the static files
app.use(ssrHandler) // Use the SSR handler

// Start the server as inidicated by the runtime in the hono documentation
export default {
  fetch: app.fetch,
  port: process.env.PORT ?? 3000,
}

Where did you find it?

https://elysiajs.com/integrations/astro.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions