You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can find the complete source code used in this demo [here](https://github.com/subtrace/nextjs-demo).
33
+
That's it! You can now visit [localhost:3000](localhost:3000) to see them automatically appear in the Subtrace [dashboard](https://subtrace.dev/dashboard) in realtime.
Copy file name to clipboardexpand all lines: sveltekit.mdx
+13-46
Original file line number
Diff line number
Diff line change
@@ -5,44 +5,8 @@ description: "Connect your SvelteKit app to Chrome DevTools using Subtrace"
5
5
icon: "node-js"
6
6
---
7
7
8
-
You can connect your SvelteKit app to Chrome DevTools with just one command
9
-
to see the status, headers, payload, and latency of all API requests.
10
-
11
-
For this guide, we'll use a simple SvelteKit app as an example. The app has one page (`+page.svelte`) and one API handler (`routes/api/hello/+server.ts`).
12
-
13
-
```html
14
-
<!-- +page.svelte -->
15
-
<script>
16
-
let message ="";
17
-
18
-
asyncfunctiongetMessage() {
19
-
constres=awaitfetch("/api/hello");
20
-
constdata=awaitres.json();
21
-
message =data.message;
22
-
}
23
-
</script>
24
-
25
-
<main>
26
-
<h1>Trigger a GET request with the button.</h1>
27
-
<buttonon:click="{getMessage}">Make API call</button>
0 commit comments