Skip to content

Commit 55dbbb3

Browse files
authored
Merge branch 'canary' into fix/optional-value-normalizing
2 parents 506e89f + f4c1594 commit 55dbbb3

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

docs/middleware.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ Middleware runs directly after `redirects` and `headers`, before the first files
7676

7777
Middleware uses a [strict runtime](/docs/api-reference/edge-runtime.md) that supports standard Web APIs like `fetch`. This works out of the box using `next start`, as well as on Edge platforms like Vercel, which use [Edge Functions](http://www.vercel.com/edge).
7878

79+
## Custom Server
80+
81+
When using a custom server with middleware, you must specify the hostname and port when instantiating your `NextApp`.
82+
83+
```ts
84+
import next from 'next'
85+
// ...
86+
const port = process.env.PORT ? +process.env.PORT : 3000
87+
const dev = process.env.NODE_ENV !== 'production'
88+
const app = next({ dev, customServer: true, hostname: 'localhost', port })
89+
```
90+
7991
## Related
8092

8193
<div class="card">

packages/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@next/env": "12.0.9-canary.5",
7575
"caniuse-lite": "^1.0.30001283",
7676
"postcss": "8.4.5",
77-
"styled-jsx": "5.0.0-beta.7",
77+
"styled-jsx": "5.0.0",
7878
"use-subscription": "1.5.1"
7979
},
8080
"peerDependencies": {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18906,10 +18906,10 @@ styled-jsx-plugin-postcss@3.0.2:
1890618906
postcss "^7.0.2"
1890718907
postcss-load-plugins "^2.3.0"
1890818908

18909-
styled-jsx@5.0.0-beta.7:
18910-
version "5.0.0-beta.7"
18911-
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0-beta.7.tgz#d952f888576b1390897b2b2a026eb43eeef7ee85"
18912-
integrity sha512-fCrifrkBKt+SM6aNDNnRWiV0YP7JJ6HRLCofyfbseo0RFhbxD2pka5zG5yH5Ym8KOChUrEFbibkjWeSB7n6IwQ==
18909+
styled-jsx@5.0.0:
18910+
version "5.0.0"
18911+
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0.tgz#816b4b92e07b1786c6b7111821750e0ba4d26e77"
18912+
integrity sha512-qUqsWoBquEdERe10EW8vLp3jT25s/ssG1/qX5gZ4wu15OZpmSMFI2v+fWlRhLfykA5rFtlJ1ME8A8pm/peV4WA==
1891318913

1891418914
stylehacks@^4.0.0:
1891518915
version "4.0.3"

0 commit comments

Comments
 (0)