Implementation of a Custom Server for a SvelteKit 2 SSR project with Hydration.
Here's what this example project contains:
sqls/migrations/*.sql
are automatically executed.
This applies both in development mode (pnpm run dev
) and in production mode (pnpm run build; pnpm run preview
).@beenotung/better-sqlite3-helper
.Important information: This technique is no longer necessary since SvelteKit version 2.10 released in December 2024. I recommend using the Shared hooks init feature instead.
$ mise install
$ pnpm install
$ pnpm run load-seed-data
Launch the project in dev mode:
$ pnpm run dev
Server started on http://localhost:5173 in development mode
Launch the project in production mode:
$ pnpm run build
$ pnpm run preview
Server started on http://localhost:3000 in production mode