A sample application to embed SvelteKit app with fiber filesystem middleware.
- Go 1.16
- Node 14
Inside the root of application directory.
Install node modules
npm install --prefix ./frontend
Build static HTML
npm run build --prefix ./frontend
Build the Go binary
go build main.go
Run the app
./main
Open http://localhost:8080/ in the browser.
Build the container
make build
Run the container
make run
Open http://localhost:8080/ in the browser.
Make it sure the static HTML already generated inside the public folder and then run:
docker build . -t sveltekit:latest
Run the container
docker run -d -p 8080:8080 --name sveltekit sveltekit:latest
Open http://localhost:8080/ in the browser.