Skip to content

Commit

Permalink
feat(config): enable dotenv
Browse files Browse the repository at this point in the history
Adds and enables dotenv so that .env is used even when running outside
of docker-compose.
  • Loading branch information
djwhitt committed Jun 21, 2023
1 parent f67817d commit 591195f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import dotenv from 'dotenv';
import crypto from 'node:crypto';

import { createFilter } from './filters.js';
import * as env from './lib/env.js';
import log from './log.js';

dotenv.config();

export const START_HEIGHT = +env.varOrDefault('START_HEIGHT', '0');
export const STOP_HEIGHT = +env.varOrDefault('STOP_HEIGHT', 'Infinity');
export const TRUSTED_NODE_URL = env.varOrDefault(
Expand Down

0 comments on commit 591195f

Please sign in to comment.