Edit

Self-host

To self-host your app:

  1. If you didn't already, define +server.js with your favorite server (Hono, Express, ...), or set +server to true to use Vike's built-in lightweight server.

  2. Build your app for production:
    $ vike build

    This generates a dist/ folder that you typically upload to your production server.

  3. Start your app in your production server:
    $ node ./dist/server/index.mjs # or Bun/Deno

We generally recommend using +server, but instead of +server you can also manually integrate a server via renderPage().

See also