Skip to content

Commit 6f00cde

Browse files
GregBrimblemaxvp
authored andcommitted
Add note about default port used by wrangler dev (#24129)
1 parent fb70db7 commit 6f00cde

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Like Pages, requests for static assets on Workers are free, and Pages Functions
2626

2727
Unlike Pages, Workers has a distinctly broader set of features available to it, (including Durable Objects, Cron Triggers, and more comprehensive Observability). A complete list can be found at [the bottom of this page](#compatibility-matrix). Workers will receive the focus of Cloudflare's development efforts going forwards, so we therefore [are recommending using Cloudflare Workers over Cloudflare Pages for any new projects](http://blog.cloudflare.com/full-stack-development-on-cloudflare-workers).
2828

29-
## Migration
29+
## Migration
3030

3131
Migrating from Cloudflare Pages to Cloudflare Workers is often a straightforward process. The following are some of the most common steps you will need to take to migrate your project.
3232

@@ -304,6 +304,13 @@ If you are [using Workers Builds](#builds), ensure you also [configure any varia
304304

305305
Where previously you used [`wrangler pages dev`](/workers/wrangler/commands/#dev-1) and [`wrangler pages deploy`](/workers/wrangler/commands/#deploy-1), now instead use [`wrangler dev`](/workers/wrangler/commands/#dev) and [`wrangler deploy`](/workers/wrangler/commands/#deploy). Additionally, if you are using a Vite-powered framework, [our new Vite plugin](/workers/vite-plugin/) may be able offer you an even simpler development experience.
306306

307+
:::note[Wrangler uses a different default port for the local development]
308+
309+
`wrangler pages dev` will, by default, expose the local development server at `http://localhost:8788`, whereas `wrangler dev` will expose it at `http://localhost:8787/`.
310+
311+
You can customize the port using `--port`.
312+
:::
313+
307314
### Builds
308315

309316
If you are using Pages' built-in CI/CD system, you can swap this for Workers Builds by first [connecting your repository to Workers Builds](/workers/ci-cd/builds/#get-started) and then [disabling automatic deployments on your Pages project](/pages/configuration/git-integration/#disable-automatic-deployments).
@@ -381,7 +388,7 @@ Once you have validated the behavior of Worker, and are satisfied with the devel
381388

382389
## Migrate your project using an AI coding assistant
383390

384-
You can add the following [experimental prompt](https://developers.cloudflare.com/workers/prompts/pages-to-workers.txt) in your preferred coding assistant (e.g. Claude Code, Cursor) to make your project compatible with Workers:
391+
You can add the following [experimental prompt](https://developers.cloudflare.com/workers/prompts/pages-to-workers.txt) in your preferred coding assistant (e.g. Claude Code, Cursor) to make your project compatible with Workers:
385392

386393
```
387394
https://developers.cloudflare.com/workers/prompts/pages-to-workers.txt
@@ -407,7 +414,7 @@ This compatibility matrix compares the features of Workers and Pages. Unless oth
407414
| [Gradual Deployments](/workers/configuration/versions-and-deployments/) |||
408415
| [Preview URLs](/workers/configuration/previews) |||
409416
| [Testing tools](/workers/testing) |||
410-
| [Local Development](/workers/development-testing/) |||
417+
| [Local Development](/workers/development-testing/) |||
411418
| [Remote Development (`--remote`)](/workers/wrangler/commands/) |||
412419
| [Quick Editor in Dashboard](https://blog.cloudflare.com/improved-quick-edit) |||
413420
| **Static Assets** | | |

0 commit comments

Comments
 (0)