You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
905 B
36 lines
905 B
<script>
|
|
import { push, link } from 'svelte-spa-router';
|
|
import Validator from 'Validator';
|
|
import { onMount } from 'svelte';
|
|
import Layout from '$/client/Layout.svelte';
|
|
import Blockstart from '$/client/components/Blockstart.svelte';
|
|
import Icon from '$/client/components/Icon.svelte';
|
|
import api from "$/client/api.js";
|
|
|
|
api.mock({
|
|
"/api<%- api_url %>": {
|
|
"get": [200, {"message": "OK"}],
|
|
}
|
|
});
|
|
|
|
onMount(async () => {
|
|
const [status, data] = await api.get("/api<%- api_url %>");
|
|
|
|
if(status === 200) {
|
|
console.log("STATUS", status, "DATA", data);
|
|
} else {
|
|
console.error("Invalid response", status, data);
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|
|
|
|
<Layout centered={ true }>
|
|
<h1>Client Svelte Page</h1>
|
|
|
|
<p>Place this in <b>client/pages</b> and it will be included in the SPA client sent to the browser when they access /client/</p>
|
|
|
|
</Layout>
|
|
|