add flake and move to npm

This commit is contained in:
Joakim Repomaa
2026-02-22 22:23:49 +02:00
parent 9f661e4d57
commit 5ae9386fcd
11 changed files with 6579 additions and 1635 deletions
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
export const prerender = true
+10 -3
View File
@@ -1,9 +1,16 @@
import type { NetworkStatus } from '$lib/types'
import networkData from '$lib/network-status.json'
import type { PageLoad } from './$types'
export const load: PageLoad = async () => {
export const ssr = false
const API_PORT = import.meta.env.PUBLIC_API_PORT ?? '8080'
export const load: PageLoad = async ({ fetch, url }) => {
const apiUrl = `${url.protocol}//${url.hostname}:${API_PORT}`
const response = await fetch(apiUrl)
const networkStatus: NetworkStatus = await response.json()
return {
networkStatus: networkData as NetworkStatus,
networkStatus,
}
}