Skip to content

remarkablemark/cloudflare-functions-demo

Repository files navigation

cloudflare-functions-demo

Cloudflare Functions Demo. See Cloudflare documentation

Prerequisites

Install

Clone the repository:

git clone https://github.com/remarkablemark/cloudflare-functions-demo.git
cd cloudflare-functions-demo

Install the dependencies:

npm install

Run

Start a local server for developing your Pages:

npm start

Fix error Address already in use; 0.0.0.0:8788:

kill $(lsof -ti :8788)

Functions

File Endpoint
dynamic/[name].ts /dynamic/world
r2 /r2
cache /cache
cf /cf
cors-proxy /cors-proxy
cors /cors
environment-variables /environment-variables
fetch /fetch
form /form
headers /headers
helloworld /helloworld
html /html
ip /ip
json /json
kv /kv
onRequests /onRequests
post /post
querystring /querystring
redirect /redirect
secrets /secrets
stream /stream
typescript /typescript
uuid /uuid

License

MIT