Skip to content

Commit

Permalink
chore(docs): Extend the options for custom server init
Browse files Browse the repository at this point in the history
  • Loading branch information
DevLab2425 committed Jul 19, 2023
1 parent f5272ac commit 655d480
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,17 @@ 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 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/pages/api-reference/next-config-js). Defaults to `{}`
|Option|Type|Description|
|------|----|-----------|
|`conf`|`Object`|The same object you would use in [next.config.js](/docs/pages/api-reference/next-config-js). Defaults to `{}`|
|`customServer`|`Boolean`|(_Optional_) Set to false when the server was created by Next.js|
|`dev`|`Boolean`|(_Optional_) Whether or not to launch Next.js in dev mode. Defaults to `false`|
|`dir`|`String`|(_Optional_) Location of the Next.js project. Defaults to `'.'`|
|`minimalMode`|`Boolean`|(_Optional_) Tells if Next.js is running in a Serverless platform|
|`quiet`|`Boolean`|(_Optional_) Hide error messages containing server information. Defaults to `false`|
|`hostname`|`String`|(_Optional_) The hostname the server is running behind|
|`port`|`Number`|(_Optional_) The port the server is running behind|
|`httpServer`|`node:http#Server`|(_Optional_) The HTTP Server that Next.js is running behind|

The returned `app` can then be used to let Next.js handle requests as required.

Expand Down

0 comments on commit 655d480

Please sign in to comment.