Sample code
Last updated
Last updated
NextJS
Here is an example NextJS app that has its own local /api/glif API endpoint:
Simple HTML + CSS (Replit)
Here is a simple pure HTML + CSS + vanilla javascript app hosted on Replit that you can fork and run right there:
Cloudflare Worker
Since that repl app is pure HTML and doesnβt have its own API, weβre using a Cloudflare Worker serverless function to handle talking to the Glif API w/ CORS headers set:
The βSimple APIβ above is basically just this code with a shared API token.