Skip to content

Commit

Permalink
Load nocodb credentials from env
Browse files Browse the repository at this point in the history
  • Loading branch information
malte-laukoetter committed Dec 19, 2023
1 parent 7f3e212 commit b3b37dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NOCODB_BASE_URL="https://metrics.ds4g.dev:38081"
NOCODB_AUTH_TOKEN="YOUR_NOCODB_AUTH_TOKEN"
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fileignoreconfig:
checksum: 446eff0044854604c36e380d186aab48077af382668430ad518ef49b37d4fa02
- filename: SECURITY.md
checksum: b1743150cdd537be3a66f5308f887d130f0f320ab21628b63713808090a84e3f
- filename: .env.example
checksum: 71ab6e499db835e32c6656aafe28833d7d49b4e1441ba8404dc28691da023609
- filename: app/tasks/nocodbClient.server.ts
checksum: f4bcc85b1fbacd2a8dd8da7675849a40024fb1f7d909b4692954412aa2473319
- filename: app/mocks/stubs/calculationPositions.json
Expand Down
5 changes: 2 additions & 3 deletions app/tasks/nocodbClient.server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Api } from "nocodb-sdk";

const api = new Api({
baseURL: "https://metrics.ds4g.dev:38081",
baseURL: process.env.NOCODB_BASE_URL,
headers: {
"xc-auth":
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InZpY3Rvci5kZWxjYW1wb0BkaWdpdGFsc2VydmljZS5idW5kLmRlIiwiaWQiOiJ1c19kMTVwNGVrZzJucm9rdyIsInJvbGVzIjp7Im9yZy1sZXZlbC1jcmVhdG9yIjp0cnVlfSwidG9rZW5fdmVyc2lvbiI6ImNmNDE2ZTNjZjEwNWZmZWNjNWU3OWI2NjlkNjc0YzIxY2NiNjBjMjQ2NWQzMDljYTMyYmRlMzZjNzhjN2FiMGI2ZTJhMjc1MmNlYjU1MDQyIiwiaWF0IjoxNzAyNDUzNTM2LCJleHAiOjE3MzQwMTExMzZ9.V2srnNdZHj_m0tZyTZCQXT_o23SviCIuTBPmzQDslVI",
"xc-auth": process.env.NOCODB_AUTH_TOKEN,
},
});

Expand Down

0 comments on commit b3b37dc

Please sign in to comment.