diff --git a/functions/programs.js b/functions/programs.js new file mode 100644 index 0000000..9796fef --- /dev/null +++ b/functions/programs.js @@ -0,0 +1,3 @@ +export function onRequest(ctx) { + return new Response("Hello, world!"); +} \ No newline at end of file diff --git a/images/.DS_Store b/images/.DS_Store index c275b5e..7383ced 100755 Binary files a/images/.DS_Store and b/images/.DS_Store differ diff --git a/programs/script.js b/programs/script.js index 8141e89..d98aba5 100755 --- a/programs/script.js +++ b/programs/script.js @@ -1,5 +1,8 @@ -fetch(`${ location.origin }/api/programs/`) - .then(data => data.json()) +fetch("https://worker-programs-api.99thedark.workers.dev/") + .then(data => { + console.log(data); + return data.json(); + }) .then(json => generatePrograms(json)) const displayMonths = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];