telesto🌛T
Deno10mo ago
telesto🌛

Using something like environment variables in fresh🍋

Is there anything I could use to use different (environment) variables in fresh?
It is sort of implied in
deno.json
already:
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build"

and
dev.ts
is
#!/usr/bin/env -S deno run -A --watch=static/,routes/

import dev from '$fresh/dev.ts';
import config from './fresh.config.ts';

import '$std/dotenv/load.ts';

await dev(import.meta.url, './main.ts', config);

but that is set to
FreshConfig
. I'd like to set additional fields which I can use to set an api key or a base url.
Is there something I could do?
Was this page helpful?