You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced-features/custom-server.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ description: Start a Next.js app programmatically using a custom server.
17
17
18
18
Typically you start your next server with `next start`. It's possible, however, to start a server 100% programmatically in order to use custom route patterns.
19
19
20
-
> Before deciding to use a custom a custom server please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. A custom server will remove important performance optimizations, like **serverless functions** and **[Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md).**
20
+
> Before deciding to use a custom server please keep in mind that it should only be used when the integrated router of Next.js can't meet your app requirements. A custom server will remove important performance optimizations, like **serverless functions** and **[Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md).**
21
21
22
22
Take a look at the following example of a custom server:
23
23
@@ -75,7 +75,7 @@ const app = next({})
75
75
76
76
The above `next` import is a function that receives an object with the following options:
77
77
78
-
-`dev`: `Boolean` - Whether or not to launch Next.js in dev mode. Defaults `false`
78
+
-`dev`: `Boolean` - Whether or not to launch Next.js in dev mode. Defaults to `false`
79
79
-`dir`: `String` - Location of the Next.js project. Defaults to `'.'`
80
80
-`quiet`: `Boolean` - Hide error messages containing server information. Defaults to `false`
81
81
-`conf`: `object` - The same object you would use in [next.config.js](/docs/api-reference/next.config.js/introduction.md). Defaults to `{}`
@@ -86,7 +86,7 @@ The returned `app` can then be used to let Next.js handle requests as required.
86
86
87
87
By default, `Next` will serve each file in the `pages` folder under a pathname matching the filename. If your project uses a custom server, this behavior may result in the same content being served from multiple paths, which can present problems with SEO and UX.
88
88
89
-
To disable this behavior & prevent routing based on files in `pages`, open `next.config.js` and disable the `useFileSystemPublicRoutes` config:
89
+
To disable this behavior and prevent routing based on files in `pages`, open `next.config.js` and disable the `useFileSystemPublicRoutes` config:
0 commit comments