minimal example how to integrate svelte-mpa with Golang (in this case Fiber framework)
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
- 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