Skip to content

Instantly share code, notes, and snippets.

View alexvdvalk's full-sized avatar

Alex van der Valk alexvdvalk

View GitHub Profile
@alexvdvalk
alexvdvalk / external request page interaction.ts
Created October 20, 2025 09:37
Make external API request from a Bullhorn page interaction
const url =
"https://meetup.trycloudflare.com"; // update with your endpoint
const a = async()=> { // Javascript promise
const response = await fetch (url, {
method: 'POST',
body: JSON.stringify(form.data)
})
const data = await response.json();
console.log('data', data);
@alexvdvalk
alexvdvalk / +page.svelte
Created June 15, 2023 14:04
Sveltekit Directus Websockets Demo
<script lang="ts">
import { onMount } from 'svelte';
const url = 'ws://localhost:8055/websocket';
const access_token = 'your key';
const collection = 'posts';
onMount(() => {
const connection = new WebSocket(url);
connection.addEventListener('open', function () {