sveltefiber Svelte Themes

Sveltefiber

example for gofiber/fiber with svelte

SvelteFiber example

minimal example how to integrate svelte-mpa with Golang (in this case Fiber framework)

Dependencies

How to start

go mod tidy

# start golang backend
air # localhost:3001 for backend and SSR

# start auto recompile
cd svelte 
npm i && npm start # localhost:5500 for client side dev mode
# or using bun
bun install && bun start 

How it works

  • svelte-mpa will generate index.html that loaded by fiber app
  • fiber app renders/replace any special template keywords in the index.html
  • all other API handled by normal gofiber handler

Top categories

Loading Svelte Themes