Skip to content

Commit

Permalink
Working on CloudFlare functions
Browse files Browse the repository at this point in the history
  • Loading branch information
99TheDark committed Jan 8, 2024
1 parent 5193c48 commit 192a9e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions functions/programs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function onRequest(ctx) {
return new Response("Hello, world!");
}
Binary file modified images/.DS_Store
Binary file not shown.
7 changes: 5 additions & 2 deletions programs/script.js
Original file line number Diff line number Diff line change
@@ -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"];
Expand Down

0 comments on commit 192a9e2

Please sign in to comment.