lyre-beacon
v0.1.0
Published
To install beacon:
Readme
To install beacon:
npm install lyre-beacon
pnpm install lyre-beaconYou need these in your .env
APIKEY=
REBASEURL=
BASEURL=
PUBLIC_BASEURL=
SESSION_SECRET=Put this inside src/hooks.server.ts
import { handle as beaconHandle } from 'beacon/server';
export const handle = beaconHandle;Put these inside your src/app.d.ts
import type { Session } from 'svelte-kit-cookie-session';
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
type SessionData = {
accessToken: string;
user: {
id: number;
name: string;
email: string;
is_guest: boolean;
} | null;
};
declare global {
namespace App {
// interface Error {}
interface Locals {
session: Session<SessionData>;
}
interface PageData {
// can add any properties here, return it from your root layout
session: SessionData;
}
// interface PageState {}
// interface Platform {}
}
}
export { };Put these inside src/routes/x-api/base/+server.ts
import { xAPIHandler } from "beacon/server";
export const POST = xAPIHandler;