Framework Guide

Svelte on CupaDev

Deploy your SvelteKit applications with edge rendering, serverless functions, and lightning-fast performance.

Getting Started

Deploy your SvelteKit app in minutes

1

Create your SvelteKit app

Start with a new SvelteKit project or use an existing one.

npm create svelte@latest myapp
2

Connect your repository

Connect your GitHub, GitLab, or Bitbucket repository to CupaDev.

git push origin main
3

Deploy automatically

Your SvelteKit app deploys with optimal settings automatically.

Deployed ✓

Example Configuration

svelte.config.js

import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from 'svelte-preprocess/+build';

export default {
  preprocess: vitePreprocess(),
  kit: {
    adapter: adapter({
      out: 'build'
    }),
    env: {
      publicPrefix: 'PUBLIC_'
    },
    alias: {
      $components: 'src/components',
      $lib: 'src/lib'
    }
  }
}

Build & Deployment

Configure your SvelteKit app with Node.js adapter for optimal performance.

  • Node.js adapter with automatic optimizations
  • Built-in environment variable management

Routes & Pages

File-based routing with support for advanced patterns.

  • Page routes with layouts
  • API routes and server endpoints

Svelte Features on CupaDev

Reactive Components

  • True compiler-based reactivity
  • Scoped CSS by default
  • Animations and transitions built-in
  • Two-way binding with ease

Server & Data Loading

  • Server load functions with automatic caching
  • Streaming responses support
  • Server endpoints for API routes
  • Form actions with POST/PUT/DELETE

Routing & Navigation

  • File-based routing with dynamic segments
  • Layout groups and nested layouts
  • Error pages and fallbacks
  • Navigation state and transitions

Performance & Optimization

  • Minimal JavaScript bundle size
  • Automatic code splitting
  • Service worker integration
  • Link prefetching and optimization

Additional Setup

Environment Variables

Configure environment variables for your SvelteKit deployment:

PUBLIC_API_URL=https://api.example.com
SECRET_API_KEY=your_secret_key
DATABASE_URL=postgresql://...

Variables prefixed with PUBLIC_ are exposed to the browser.

Hooks & Middleware

Extend SvelteKit with hooks and custom middleware:

  • Server hooks for request/response handling
  • Client hooks for navigation events
  • Universal hooks for shared logic
  • Authentication middleware patterns

Custom Domains & SSL

Point your custom domain to your SvelteKit deployment:

  • Free SSL certificates with auto-renewal
  • DNS management and CNAME setup
  • Wildcard subdomains support

Ready to deploy your SvelteKit app?

Get your SvelteKit application deployed with lightning-fast performance and serverless scaling in minutes.