Skip to content

Commit

Permalink
Testing cross-domain integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ctavolazzi committed Jun 16, 2024
1 parent 60d2672 commit 4a8f792
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions novasystem-io/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
<!-- <h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p> -->

<script>
import { onMount } from 'svelte';
let backendData = '';
onMount(async () => {
try {
const response = await fetch('https://novasystem-backend-5bc4a8329298.herokuapp.com/');
backendData = await response.text();
} catch (error) {
console.error('Error fetching data from the backend:', error);
}
});
</script>

<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>

{#if backendData}
<p>Data from the backend: {backendData}</p>
{:else}
<p>Loading data from the backend...</p>
{/if}

0 comments on commit 4a8f792

Please sign in to comment.