remove strapi and use mdsvex for blog
Some checks failed
Deployment / Deploy website (push) Successful in 3m21s
Deployment / Deploy strapi (push) Failing after 1m12s

This commit is contained in:
Benjamin Palko 2026-01-22 23:53:41 -05:00
parent 4673e8dbe6
commit 32fd2642b1
14 changed files with 319 additions and 180 deletions

View file

@ -1,25 +1,15 @@
import { env } from '$env/dynamic/private';
import { logger } from '$lib/server/logger';
import { Strapi } from '$lib/server/strapi';
import type { Handle, HandleServerError } from '@sveltejs/kit';
import type { HandleServerError } from '@sveltejs/kit';
import { randomUUID } from 'crypto';
export const handleError: HandleServerError = async ({ error, event, message, status }) => {
const errorId = randomUUID();
const errorId = randomUUID();
logger.error({ error, errorId, event, message, status }, 'Blyat');
logger.error({ error, errorId, event, message, status }, 'Blyat');
return {
message: 'An Internal Error Occurred',
errorId
};
return {
message: 'An Internal Error Occurred',
errorId
};
};
export const handle: Handle = async ({ event, resolve }) => {
event.locals = {
strapi: new Strapi(`http://${env.STRAPI_HOST}:${env.STRAPI_PORT}`, env.STRAPI_TOKEN)
};
const response = await resolve(event);
return response;
};