
Chrisgo-75
Serverless Apps On Cloudfare - Questions on Ch. 1
-
I wasn’t sure if
/src/index.ts
should contain the “fetch” function or the “scheduled” function. But in looking at the end of Ch. 1 there is an image of “Hello World!” displaying in the browser which helped. So I putindex.ts
back to the way it was (containing the “fetch” function) and created a new file to contain the “scheduled” function. -
Should the “scheduled” function be called by the worker? And if so how or what triggers it to be called?
-
My code can be found at
https://github.com/Chrisgo-75/serverless_apps_on_cloudfare
Thank you
Chris
First Post!

ashleypeacock
Hey,
No need to put the scheduled function anywhere - it’s not needed, it’s just there so you know you can schedule things if needed. I can see why it would be confusing though, so I’ll move it to an aside (a little info box) instead, so it doesn’t disrupt the flow of the chapter and doesn’t cause confusion.
Thanks for raising, and for purchasing, and I hope you’re enjoying the book!
Ashley
Popular Pragmatic topics









Modern Front-End Development for Rails - application does not start after run bin/setup (page xviii)

Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /react-native
- /textmate
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /julia
- /slackware
- /c
- /neovim