2021-08-11 21:48:33 +00:00
|
|
|
/** @version 2 */
|
2021-03-28 20:14:04 +00:00
|
|
|
export default {
|
2021-04-15 18:49:29 +00:00
|
|
|
/**
|
|
|
|
* Whether to enable HTTPS.
|
|
|
|
*
|
|
|
|
* @example
|
2022-04-19 14:46:14 +00:00
|
|
|
* ```
|
|
|
|
* import { fileURLToPath } from 'node:url'
|
2021-08-11 21:48:33 +00:00
|
|
|
* export default {
|
|
|
|
* server: {
|
|
|
|
* https: {
|
2022-04-19 14:46:14 +00:00
|
|
|
* key: fs.readFileSync(fileURLToPath(new URL('./server.key', import.meta.url))),
|
|
|
|
* cert: fs.readFileSync(fileURLToPath(new URL('./server.crt', import.meta.url)))
|
2021-08-11 21:48:33 +00:00
|
|
|
* }
|
|
|
|
* }
|
2021-04-15 18:49:29 +00:00
|
|
|
* }
|
|
|
|
* ```
|
2021-11-04 18:40:02 +00:00
|
|
|
*
|
|
|
|
* @version 2
|
|
|
|
*
|
|
|
|
* @deprecated This option is ignored with Bridge and Nuxt 3
|
2021-04-15 18:49:29 +00:00
|
|
|
*/
|
2021-03-28 20:14:04 +00:00
|
|
|
https: false,
|
2021-11-04 18:40:02 +00:00
|
|
|
/** @deprecated This option is ignored with Bridge and Nuxt 3 */
|
2021-03-28 20:14:04 +00:00
|
|
|
port: process.env.NUXT_PORT || process.env.PORT || process.env.npm_package_config_nuxt_port || 3000,
|
2021-11-04 18:40:02 +00:00
|
|
|
/** @deprecated This option is ignored with Bridge and Nuxt 3 */
|
2021-03-28 20:14:04 +00:00
|
|
|
host: process.env.NUXT_HOST || process.env.HOST || process.env.npm_package_config_nuxt_host || 'localhost',
|
2021-11-04 18:40:02 +00:00
|
|
|
/** @deprecated This option is ignored with Bridge and Nuxt 3 */
|
2021-03-28 20:14:04 +00:00
|
|
|
socket: process.env.UNIX_SOCKET || process.env.npm_package_config_unix_socket,
|
2021-04-15 18:49:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enabling timing adds a middleware to measure the time elapsed during
|
|
|
|
* server-side rendering and adds it to the headers as 'Server-Timing'.
|
|
|
|
*
|
|
|
|
* Apart from true/false, this can be an object for providing options.
|
|
|
|
* Currently, only `total` is supported (which directly tracks the whole
|
|
|
|
* time spent on server-side rendering.
|
|
|
|
*/
|
2021-11-04 18:40:02 +00:00
|
|
|
/** @deprecated This option is ignored with Bridge and Nuxt 3 */
|
2021-03-28 20:14:04 +00:00
|
|
|
timing: (val: any) => val ? ({ total: true, ...val }) : false
|
|
|
|
}
|