From bbe9605f6fb4009b7c0ad899cc39cc87ee64022c Mon Sep 17 00:00:00 2001 From: Marco Pasqualetti <24919330+marcalexiei@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:53:49 +0100 Subject: [PATCH] docs(configuration): add documentation for `server` option (#446) Co-authored-by: Valerio Ageno <51341197+Valerioageno@users.noreply.github.com> --- .../routes/documentation/configuration.mdx | 19 +++++++++++++++++++ packages/tuono/src/config/types.ts | 3 +++ 2 files changed, 22 insertions(+) diff --git a/apps/documentation/src/routes/documentation/configuration.mdx b/apps/documentation/src/routes/documentation/configuration.mdx index 1097732f..66f9515e 100644 --- a/apps/documentation/src/routes/documentation/configuration.mdx +++ b/apps/documentation/src/routes/documentation/configuration.mdx @@ -55,3 +55,22 @@ Useful for extending vite's functionality - Type: `Array | Promise>` - [Vite documentation: plugins](https://vite.dev/guide/using-plugins) + +## server + +The following options configure the server. + +## server.host + +- Type: `string` +- Default: `'localhost'` + +The hostname or IP address of the server. +It can be a domain name (e.g., `"example.com"`) or an IP address (e.g., `"127.0.0.1"`) + +## server.port + +- Type: `number` +- Default: `3000` + +The port number where the server will listen for incoming requests. diff --git a/packages/tuono/src/config/types.ts b/packages/tuono/src/config/types.ts index cff248be..b836431b 100644 --- a/packages/tuono/src/config/types.ts +++ b/packages/tuono/src/config/types.ts @@ -1,5 +1,8 @@ import type { AliasOptions, DepOptimizationOptions, PluginOption } from 'vite' +/** + * @see http://tuono.dev/documentation/configuration + */ export interface TuonoConfig { server?: { host?: string