sveltekit-tauri-starter Svelte Themes

Sveltekit Tauri Starter

While Tauri typically operates as a SPA (Single Page Application) based project, this project is configured to deploy SvelteKit to the web, allowing it to be used as an API Route as well.

SvelteKit + Tauri Project

This project is developed using Tauri and SvelteKit.

Project Overview

While Tauri typically operates as a SPA (Single Page Application) based project, this project is configured to deploy SvelteKit to the web, allowing it to be used as an API Route as well.

Environment Variable Setup

The .env file is not committed, so you need to set the following environment variables to run the project:

VITE_API_URL="http://localhost:1420/api"
DATABASE_URL="postgresql URL"

Note: For simple testing, the database was tested by connecting to Supabase's PostgreSQL.

Build and Run

Build and Preview Web Application

pnpm build:full
pnpm preview

You can check the web application after starting the server with the pnpm preview command.

Run in Development Mode

pnpm dev
# or
pnpm tauri dev

You can verify the connection with the server running via pnpm preview by setting VITE_API_URL.

Top categories

Loading Svelte Themes