
SvelteKit Has a Free API — Full-Stack Svelte with Zero Boilerplate
SvelteKit is the official full-stack framework for Svelte. File-based routing, SSR, API routes, form actions — everything you need to build production apps with the simplest component model in web dev. Why SvelteKit? No virtual DOM — Svelte compiles to surgical DOM updates File-based routing — src/routes/about/+page.svelte = /about Server + Client — load data on server, render on client Form Actions — progressive enhancement built-in Adapters — deploy to Vercel, Cloudflare, Node, static Quick Start npm create svelte@latest myapp cd myapp npm install npm run dev Pages and Layouts <!-- src/routes/+page.svelte --> <script> export let data ; </script> <h1> Welcome, { data . user . name } ! </h1> <ul> { #each data . posts as post } <li><a href= "/posts/{post.id}" > { post . title } </a></li> { /each } </ul> // src/routes/+page.server.ts export const load = async ({ locals }) => { const user = await locals . db . getUser (); const posts = await locals . db . getPosts (); return { user , post
Continue reading on Dev.to Tutorial
Opens in a new tab



