Skip to content

Deploying a worker

Course: Serverless Backends - chapter 8

Now that you have written a basic HTTP server, let’s get to the most interesting bit — Deploying it on the internet

We use wrangler for this (Ref https://developers.cloudflare.com/workers/wrangler/)

Step 1 - Login to cloudflare via the `wrangler cli`
npx wrangler login

Step 2 - Deploy your worker
npm run deploy

If all goes well, you should see the app up and running

You have to buy a plan to be able to do this

You also need to buy the domain on cloudflare/transfer the domain to cloudflare