Skip to content

Commit

Permalink
Fix mistakes in the Custom Server doc (#9930)
Browse files Browse the repository at this point in the history
  • Loading branch information
cullylarson authored and Timer committed Jan 3, 2020
1 parent 4a7a28a commit a3925b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/advanced-features/custom-server.md
Expand Up @@ -17,7 +17,7 @@ description: Start a Next.js app programmatically using a custom server.

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.

> 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).**
> 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).**
Take a look at the following example of a custom server:

Expand Down Expand Up @@ -75,7 +75,7 @@ const app = next({})

The above `next` import is a function that receives an object with the following options:

- `dev`: `Boolean` - Whether or not to launch Next.js in dev mode. Defaults `false`
- `dev`: `Boolean` - Whether or not to launch Next.js in dev mode. Defaults to `false`
- `dir`: `String` - Location of the Next.js project. Defaults to `'.'`
- `quiet`: `Boolean` - Hide error messages containing server information. Defaults to `false`
- `conf`: `object` - The same object you would use in [next.config.js](/docs/api-reference/next.config.js/introduction.md). Defaults to `{}`
Expand All @@ -86,7 +86,7 @@ The returned `app` can then be used to let Next.js handle requests as required.

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.

To disable this behavior & prevent routing based on files in `pages`, open `next.config.js` and disable the `useFileSystemPublicRoutes` config:
To disable this behavior and prevent routing based on files in `pages`, open `next.config.js` and disable the `useFileSystemPublicRoutes` config:

```js
module.exports = {
Expand Down

0 comments on commit a3925b5

Please sign in to comment.