Return to pre-debug state (mostly)

This commit is contained in:
2025-01-24 13:48:38 +00:00
parent 3779ab233b
commit f8d44c2193
8 changed files with 3 additions and 55 deletions

View File

@@ -27,5 +27,4 @@ EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1
# ENTRYPOINT ["bun", "/var/www/site/index.js"]
ENTRYPOINT ["bun", "run", "dev"]
ENTRYPOINT ["bun", "/var/www/site/index.js"]

View File

@@ -1,6 +0,0 @@
export const handleError = ({ error, event }) => {
if (event.url.pathname.startsWith("/repo")) {
window.location.href = event.url.pathname;
return;
}
};

View File

@@ -1,12 +0,0 @@
export const handle = async ({ event, resolve }) => {
// Paths to be handled by proxy
const proxyPaths = ["/repo"];
if (proxyPaths.some(path => event.url.pathname.startsWith(path))) {
// completely skip sveltekit routing
return;
}
// Let SvelteKit handle other paths
return resolve(event);
};

View File

@@ -5,12 +5,6 @@ export const navigation = {
toHome: () => goto("/"),
toAbout: () => goto("/about"),
toContact: () => goto("/contact"),
toRepository: () => {
console.log("Entering '/lib/navigation.js'.toRepository");
goto("/repo");
console.log("Exiting '/lib/navigation.js'.toRepository");
},
to404: () => {
throw error(404, 'Page not found');
}
toRepository: () => goto("/repo"),
to404: () => { throw error(404, 'Page not found') },
};

View File

@@ -4,15 +4,6 @@
import "$lib/styles/styles.css";
import "$lib/styles/vars.css";
import { beforeNavigate } from "$app/navigation";
beforeNavigate(({ to, cancel }) => {
if (to?.url.pathname.startsWith("/repo")) {
cancel();
window.location.href = to.url.pathname;
}
});
let { children } = $props();
</script>

View File

@@ -3,8 +3,6 @@
import Button from "$lib/components/Button.svelte";
import { navigation } from "$lib/navigation";
console.log("Serving splash page");
</script>
<div class="splash">

View File

@@ -1,9 +0,0 @@
<script>
function navigateToRepo() {
console.log("Entering '/repo/+page.svelte'.navigateToRepo");
window.location.href = "https://am-d-model.eu/repo";
console.log("Exiting '/repo/+page.svelte'.navigateToRepo");
}
navigateToRepo();
</script>

View File

@@ -1,7 +0,0 @@
import { redirect } from '@sveltejs/kit';
export function GET() {
console.log("Entering '/repo/+server.js'.GET");
throw redirect(302, "https://localhost/repo");
console.log("Exiting '/repo/+server.js'.GET");
}