Skip to content

Instantly share code, notes, and snippets.

View cotyhamilton's full-sized avatar
🐡

Coty cotyhamilton

🐡
View GitHub Profile
@cotyhamilton
cotyhamilton / README.md
Last active March 25, 2024 12:23
Add Firebase Authentication to Directus ~v9.8.x

Add Firebase Authentication to Directus v9.8.x

Set Up

Install packages

yarn add firebase-admin jsonwebtoken ms nanoid

# or
@cotyhamilton
cotyhamilton / +layout.server.ts
Last active October 19, 2022 00:19
SvelteKit Env Vars - +layout.server.ts
import { env } from "$env/dynamic/private";
import type { LayoutServerLoad } from "./$types";
export const load: LayoutServerLoad = async () => {
return {
configuration: {
environment: env.ENVIRONMENT,
displayEnvironment: env.DISPLAY_ENVIRONMENT?.toLowerCase() === "true"
}
};
@cotyhamilton
cotyhamilton / +layout.svelte
Last active October 19, 2022 00:21
SvelteKit Env Vars - +layout.svelte
<script lang="ts">
import type { PageData } from "./$types";
export let data: PageData;
const { configuration } = data;
</script>
{#if configuration.displayEnvironment}
<div class="env-details">
https://cdn.discordapp.com/attachments/926866111948001341/1190841182356525056/InfiniteFusion.zip?ex=6686af06&is=66855d86&hm=d517754bbbba753266cf4e58b16285745709603b7bbe3c15ae23e4bdd7d844a1&