Search code examples
web-hostingsveltekit

Does Sveltekit with no SSR work on normal ftp-server and php-api webhost?


Im a little confused about Sveltekit, Does it work on a normal webhost like one.com, if I turn of SSR? Does it still need nodejs or similar? Will it work with a php-api?

I have searched the www, and found something that indicated, that it would work, but it wasnt totally clear.


Solution

  • SvelteKit at its core is host agnostic. Via the use of adapters an application can be deployed in various environments.

    For a simple file server you would want the adapter for static site generation. When using this, the pages cannot have a dynamic server part, that means that they either have to be server-side pre-rendered (which allows server operations, e.g. fetching data for the construction of the page during build) or use client-side rendering.

    The result will be static files with or without JS.