BakedServerConfig (@shadow-js/dusk/server)
The server part of the configuration. (BakedServerConfig of @shadow-js/dusk/server)
The server part of the configuration.
Import#
ts
import type { BakedServerConfig } from "@shadow-js/dusk/server";
Signature#
ts
interface BakedServerConfig {
readonly security?: BakedSecurity;
readonly routing?: RoutingConfig;
readonly env?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
/**
* The locales; `routing` is present when the file declares `i18n.routing` (its settings with the defaults applied,
* without the build-only `instance`). The generated entry hands it to `withLocaleRouting`.
*/
readonly i18n?: {
readonly locales: readonly string[];
readonly defaultLocale: string;
readonly routing?: LocaleRoutingSettings;
};
readonly images?: {
readonly remotePatterns?: readonly string[];
readonly widths?: ImageWidths;
readonly maxWidth?: number;
readonly formats?: readonly string[];
readonly qualities?: readonly number[];
};
readonly cacheLife?: Readonly<Record<string, CacheLifeProfile>>;
readonly draftMode?: {
readonly secretEnv?: string;
readonly cookieName?: string;
readonly enablePath?: string;
readonly disablePath?: string;
};
readonly deploymentId?: string;
readonly skew: { readonly reload: boolean };
readonly instrumentation: boolean;
}
Members#
| Name | Type | Description |
|---|---|---|
security? |
readonly security?: BakedSecurity |
|
routing? |
readonly routing?: RoutingConfig |
|
env? |
readonly env?: Readonly<Record<string, Readonly<Record<string, unknown>>>> |
|
i18n? |
readonly i18n?: { readonly locales: readonly string[]; readonly defaultLocale: string; readonly routing?: LocaleRoutingSettings; } |
The locales; routing is present when the file declares i18n.routing (its settings with the defaults applied, without the build-only instance). The generated entry hands it to withLocaleRouting. |
images? |
readonly images?: { readonly remotePatterns?: readonly string[]; readonly widths?: ImageWidths; readonly maxWidth?: number; readonly formats?: readonly string[]; readonly qualities?: readonly number[]; } |
|
cacheLife? |
readonly cacheLife?: Readonly<Record<string, CacheLifeProfile>> |
|
draftMode? |
readonly draftMode?: { readonly secretEnv?: string; readonly cookieName?: string; readonly enablePath?: string; readonly disablePath?: string; } |
|
deploymentId? |
readonly deploymentId?: string |
|
skew |
readonly skew: { readonly reload: boolean } |
|
instrumentation |
readonly instrumentation: boolean |