Skip to content

Commit b5fe29c

Browse files
committed
Add note about default port used by wrangler dev
1 parent 61c1a97 commit b5fe29c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description: A guide for migrating from Cloudflare Pages to Cloudflare Workers.
88
---
99

1010
import {
11+
Aside,
1112
Badge,
1213
Description,
1314
FileTree,
@@ -26,7 +27,7 @@ Like Pages, requests for static assets on Workers are free, and Pages Functions
2627

2728
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).
2829

29-
## Migration
30+
## Migration
3031

3132
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.
3233

@@ -298,6 +299,15 @@ If you are [using Workers Builds](#builds), ensure you also [configure any varia
298299

299300
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.
300301

302+
<Aside
303+
type="note"
304+
title="Wrangler uses a different default port for local development"
305+
>
306+
`wrangler pages dev` will, by default, expose the local development server at
307+
`http://localhost:8788`, whereas `wrangler dev` will expose it at
308+
`http://localhost:8787/`. You can customize the port using `--port`.
309+
</Aside>
310+
301311
### Builds
302312

303313
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).
@@ -375,7 +385,7 @@ Once you have validated the behavior of Worker, and are satisfied with the devel
375385

376386
## Migrate your project using an AI coding assistant
377387

378-
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:
388+
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:
379389

380390
```
381391
https://developers.cloudflare.com/workers/prompts/pages-to-workers.txt
@@ -401,7 +411,7 @@ This compatibility matrix compares the features of Workers and Pages. Unless oth
401411
| [Gradual Deployments](/workers/configuration/versions-and-deployments/) |||
402412
| [Preview URLs](/workers/configuration/previews) |||
403413
| [Testing tools](/workers/testing) |||
404-
| [Local Development](/workers/development-testing/) |||
414+
| [Local Development](/workers/development-testing/) |||
405415
| [Remote Development (`--remote`)](/workers/wrangler/commands/) |||
406416
| [Quick Editor in Dashboard](https://blog.cloudflare.com/improved-quick-edit) |||
407417
| **Static Assets** | | |

0 commit comments

Comments
 (0)