Load dotenv in config.ts, ignore .env.defaults and .env.example

This commit is contained in:
Alex Gleason 2023-08-04 14:17:50 -05:00
parent e58e11e425
commit 8ee1a0d888
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
3 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,11 @@
import { nip19, secp } from '@/deps.ts';
import { dotenv, nip19, secp } from '@/deps.ts';
/** Load environment config from `.env` */
await dotenv.load({
export: true,
defaultsPath: null,
examplePath: null,
});
/** Application-wide configuration. */
const Conf = {

View File

@ -50,3 +50,4 @@ export { generateSeededRsa } from 'https://gitlab.com/soapbox-pub/seeded-rsa/-/r
export * as secp from 'npm:@noble/secp256k1@^1.7.1';
export { LRUCache } from 'npm:lru-cache@^10.0.0';
export { DB as Sqlite } from 'https://deno.land/x/sqlite@v3.7.0/mod.ts';
export * as dotenv from 'https://deno.land/std@0.197.0/dotenv/mod.ts';

View File

@ -1,5 +1,3 @@
import 'https://deno.land/std@0.197.0/dotenv/load.ts';
import app from './app.ts';
Deno.serve(app.fetch);