@fougere/adapter-env
The process environment as a source — MEILI_URL read as Meili's url, judged at boot.
Use it
npm install @fougere/adapter-env
pnpm add @fougere/adapter-env
bun add @fougere/adapter-env
yarn add @fougere/adapter-env
// fougere.config.ts
import '@fougere/adapter-env';
export default defineFougere({
sources: { main: { type: 'env' } },
});
The import is what makes the word exist: without it, the editor and the boot both refuse it.
Every key each one admits: sources.
What it extends
The interfaces of Fougere this package adds its words to, with declare module — see Interfaces to extend.
| interface | adds |
|---|---|
FougereSources | env |
Entries: @fougere/adapter-env
What you import
| name | |
|---|---|
Env | Reads an entity off the environment: one variable per field. Ex: MEILI_KEY, and ENTITY_KEY_FIELD for rows. |
createEnvSource |