- Quickstarts
- SvelteKit
Deploy a SvelteKit App
SvelteKit is an exciting new development from the folks who created Svelte. While Svelte is great for static site creation, SvelteKit is a framework for building high-performance web applications. It includes routing, code-splitting, offline support, and server-rendered views with client-side hydration. Each page of a SvelteKit app is actually a Svelte component!
You can choose to deploy it as a Node Server or Static Site.
The key difference is that the app deployed as a Node server is built using the SvelteKit Node.js adapter. The static site uses the SvelteKit static adapter to generate static HTML for all pages.
A sample app is deployed at https://sveltekit-app.onrender.com. Follow the steps below to start building your own SvelteKit app.
Click Deploy to Render below and follow the prompts to deploy SvelteKit to Render.
-
Create your own repo from Render’s SvelteKit template repo on GitHub (you may need to log in first).
- Alternatively, you can clone the repo and push your clone to GitLab or Bitbucket.
-
Create a new Web Service on Render, and give Render permission to access the repo.
-
Use the following values during creation:
Runtime Node
Build Command npm install && npm run build
Start Command node build/index.js
That’s it! Your SvelteKit app will be live on your Render URL as soon as the build finishes and the service starts.
A sample static site is deployed at https://sveltekit-static.onrender.com. Follow the steps below to start building your own site.
Click Deploy to Render below and follow the prompts to deploy SvelteKit to Render as a Static Site.
-
Create your own repo from Render’s SvelteKit Static template repo on GitHub (you may need to log in first).
-
Create a new Static Site on Render, and give Render permission to access the repo.
-
Use the following values during creation:
Build Command npm install && npm run build
Publish Directory build
That’s it! Your static site will be live on your Render URL as soon as the build finishes.