Skip to content

Commit 0420efc

Browse files
authored
chore: add env vars to adapter (#304)
1 parent 7b9150c commit 0420efc

File tree

3 files changed

+103
-21
lines changed

3 files changed

+103
-21
lines changed

infrastructure/web3-adapter/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"dependencies": {
1717
"@types/node": "^24.0.0",
1818
"axios": "^1.6.7",
19+
"dotenv": "^17.2.1",
1920
"evault-core": "workspace:*",
2021
"graphql-request": "^6.1.0",
2122
"pino": "^9.8.0",

infrastructure/web3-adapter/src/logging/transport.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import { transport as pinoTransport } from "pino";
22
import type { LokiOptions } from "pino-loki";
3+
import dotenv from "dotenv";
4+
import path from "path";
5+
6+
const envPath = path.resolve(__dirname, "../../../../.env")
7+
dotenv.config({ path: envPath})
38

49
export const transport = pinoTransport<LokiOptions>({
510
target: "pino-loki",
611
options: {
7-
host: process.env.LOKI_URL || "http://localhost:3100",
12+
host: process.env.LOKI_URL as string,
813
labels: {
914
app: "web3-adapter",
1015
},

pnpm-lock.yaml

Lines changed: 96 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)