SvelteKit
SvelteKit combines Svelte’s component model with server-side rendering, routing, and adapters. Use this component when you need a fast Svelte frontend that can fetch data server-side or run API endpoints. Diploi runs the build and deployment steps so your project ships with predictable infrastructure.
Add to your project
Section titled “Add to your project”Paste this entry into the components list in diploi.yaml to add SvelteKit to your project.
components: - name: SvelteKit identifier: sveltekit package: https://github.com/diploi/component-sveltekit#v2.69.3SvelteKit reference
Section titled “SvelteKit reference”Readme
Section titled “Readme”Launch a demo for free https://diploi.com/component/sveltekit
Uses the official node Docker image.
Has the @sveltejs/adapter-node adapter preconfigured.
Operation
Section titled “Operation”Getting started
Section titled “Getting started”- Create an account on Diploi, it’s free https://console.diploi.com/
- Once you are in the Dashboard, click on “Create Project +”
- Now you need to select the stack for your app. In the “Pick Components” section, select SvelteKit. You can add other frameworks to work along with your SvelteKit app. This also applies to the “Pick Add-ons” section, where you can choose the database for your app.
- Next, you need to choose “Create Repository” so your new app will start with a fresh repository.
- Finally, click “Launch Stack”.
Check the full guide https://diploi.com/blog/hosting_svelte_apps
Development
Section titled “Development”Will run npm install when component is first initialized, and npm run dev when deployment is started.
Production
Section titled “Production”Will build a production ready image. Image runs npm install & npm build when being created. Once the image runs, npm start is called.