fougere.config.ts

What the app decides: where each frond runs, what answers each port, where rows live, what is served. A key open to packages lists who answers it — import the package, and its word exists. See Configuration.

fougere.config.ts
1import { defineFougere } from '@fougere/core';
2
3export default defineFougere({
4 sources: { … },
5 conventions: { … },
6 logLevel: …,
7 maxBodyBytes: …,
8 fronds: { … },
9 ports: { … },
10 protocols: { … },
11 state: { … },
12 server: { … },
13});

Point at a key, or tap it, to see what it is. Every key is described in full below.

sources

Record<string, SourceConfig> · optional

Where entities live: a name, a type and its options, then rows: and values:.

type is one of: env (@fougere/adapter-env) · file (@fougere/adapter-file) · memory (@fougere/adapter-memory) · sqlite (@fougere/adapter-sql) · pg (@fougere/adapter-sql) · mysql (@fougere/adapter-sql) · mssql (@fougere/adapter-sql) · d1 (@fougere/adapter-sql). Every key each one admits: Source types.

conventions

ConventionsInput · optional

The names the scan reads: the import scope, the fronds directory, every convention directory.

logLevel

LogLevel · optional

How much every logger says.

maxBodyBytes

number · optional

How many bytes a caller may send in one call — 2 MiB when unsaid. Consulted at every door.

fronds

FrondEntries · optional

What this app is made of, keyed by frond name or module specifier.

A package key: '@fougere/calls' · '@fougere/observability' · '@fougere/log' · '@fougere/workflow' — or a frond name, { remote: '…' } to place it elsewhere.

ports

PortChoice · optional

What answers a port — a name, or the chain from the outside in.

Fougere's own ports: see Ports Fougere opens.

protocols

ProtocolConfig · optional

The protocols this app serves beside its own calls — named here, made available by an import.

Serves: graphql (@fougere/adapter-graphql) · rest (@fougere/adapter-rest). See Protocols.

state

Record<string, StateEntry> · optional

How each name of the caller's state is kept between requests. Ex: { cart: { cookie: { maxAge: 604800 } } }.

Kept by: cookie (@fougere/state-cookie) · session (@fougere/state-session). See State keepers.

server

ServerConfig · optional

The srvx middlewares around what fougere serve answers, outside in. Ex: { use: [cors()] }.

Built with Fougere and Nuxt, hosted on GitHub Pages.