diff --git a/src/routes/+page.js b/src/routes/+page.js new file mode 100644 index 0000000..4e58e23 --- /dev/null +++ b/src/routes/+page.js @@ -0,0 +1,14 @@ +// for multiple async fetches: https://youtu.be/EQy-AYhZIlE?si=FwyAPUjbixSUlc9q&t=490 +export const load = async ({ fetch }) => { + const webservicesResult = await fetch('https://static.magnificent.nz/webservices/webservices.json'); + const webservicesData = await webservicesResult.json(); + + console.log(webservicesData); + return { + webservices: { + technologies: webservicesData.technologies, + hosts: webservicesData.hosts + } + }; +} + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5982b0a..d2f885e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,2 +1,110 @@ -
Visit kit.svelte.dev to read the documentation
+ + +