Comments (7)
via @Electroid, just run wrangler dev
instead. good idea!
from workers-sdk.
- For working/developing a Worker (without officially publishing it) then
wrangler dev
definitely seems like the obvious alternative topreview
. - Is there an additional use-case where a developer wants to share a draft Worker with a colleague or client without officially publishing it?
- Does that even make sense?
- Could we make use of environments instead?
from workers-sdk.
I think we would want to leverage environments for sharing a preview. It's something we should definitely support with dev
. It might need some API work though, because if we publish to a workers.dev
subdomain, I think we loose access to the DevTools inspector. (There's no technical limitation here, we just need to implement it in the back)
from workers-sdk.
I use it in Discord sometimes when I want to show someone a quick script (e.g. "how do I add a header to a response?"). For simple questions, cloudflareworkers.com is pretty handy. But, I've never used wrangler to use it.
If it's complex enough to require wrangler (e.g. it needs a KV binding or similar), then it's roughly complex enough to require a repo.
from workers-sdk.
We do some domain parsing in our workers and it's really easy to check things with wrangler preview. With wrangler dev we have only localhost.
from workers-sdk.
@TrySound - would the --host
flag in wrangler dev
help you here?
For example if I go to the examples/worker-app
project in our repository and run the following
(assuming that I have attached the my-zone.com
to my account):
$ npx wrangler dev --host=www.my-zone.com
Then when I browse to http://localhost:8787/foo/bar
I see the following in the dev-tools:
GET
"https://www.my-zone.com/foo/bar"
Map(22) {
[[Entries]]: {
...
{ "host": "www.my-zone.com" }
...
}
}
from workers-sdk.
Thanks, this is very helpful!
from workers-sdk.
Related Issues (20)
- 🐛 BUG: worker-speedtest template can't be deployed
- 🚀 Feature Request: Disable cache for local development
- 🐛 BUG: Wrangler type generation doesn't take into account type of variable for different environments
- feat: determine the activation mechanism for the new node compat layer for wrangler (and non-wrangler) users HOT 1
- 🐛 BUG: Redirects to not work properly in wrangler 3 HOT 7
- 🐛 BUG: spawn /path/to/workerd ENOENT [Docker] [Docker Compose] HOT 9
- 🚀 Feature Request: add `CF_PAGES` variables to `getPlatformProxy` env HOT 1
- 🐛 BUG: wrangler d1 execute cannot create tables with reserved words in double quotes HOT 1
- 🐛 BUG: Wrangler login fails HOT 1
- 🐛 BUG: [ERROR] workerd/jsg/_virtual_includes/jsg/workerd/jsg/modules.h:443: warning: NOSENTRY Worker using multiple modules in a single bundle. HOT 7
- { "errors": [], "messages": [], "result": [ { "description": "Administrative access to the entire Organization", "id": "3536bcfad5faccb999b47003c79917fb", "name": "Organization Admin", "permissions": [ "#zones:read" ] } ], "success": true, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000 } }
- 🐛 BUG: using FormData in vitest fetch doesn't automatically add `x-www-form-urlencoded` header HOT 1
- 🐛 BUG: `wrangler build` documentation is missing from `wrangler --help` HOT 1
- 🐛 BUG: Regression with waitUntil in [email protected] HOT 3
- 🐛 BUG: No such module "__STATIC_CONTENT_MANIFEST". HOT 2
- 🚀 Feature Request: A flag to skip the last published via the Cloudflare Dashboard warning HOT 2
- 🐛 BUG: Github link on miniflare.dev points to miniflare 2 repo
- 🐛 BUG: Producer sending message to queue throwing Error: Network connection lost in Miniflare
- docs(vitest-pool-workers): improve docs for Pages support
- 🚀 Improve the SolidStart Cloudflare (bindings) integration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workers-sdk.