How to exactly use "wrangler publish" because the tutorial seems outdated
https://egghead.io/lessons/cloudflare-set-up-a-new-cloudflare-workers-project-with-wrangler
Hi there so I was following this tutorial and in this they use the command
wrangler publish
but when I do so on my terminal I get the error
Do I just need to do something like wrangler publish index.js
?egghead
Set up a New Cloudflare Workers Project with wrangler
In this lesson, we'll install Wrangler, the Workers command-line tool. We'll then create a new Cloudflare Workers project using Wrangler, configure it, and then publish it.
7 Replies
That course is pretty old now and uses wrangler 1, so things have changed. You'll want to use Wrangler 2 via
wrangler
, instead of @cloudflare/wrangler
, and then specify a main
in your wrangler.toml
https://developers.cloudflare.com/workers/get-started/guide/ is a good place to start
Get started guide · Cloudflare Workers docs
This guide will instruct you through setting up a Cloudflare account to deploying your first Worker. This guide assumes that you already have a …
oh thanks @cherryjimbo
also unrelated but any idea what is wrong with
curl in Windows is... different
curl
is an alias to Invoke-WebRequest
in Windows Powershell, with very different syntaxoh...
F
Windows does include real curl as well though, you can swap out curl for curl.exe in the command and it should be better