mirror of
https://github.com/kc4x4sar/d4h-typescript.git
synced 2026-07-12 17:21:05 -07:00
Added proper config support to test project
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
export default {
|
||||
d4hToken: "",
|
||||
}
|
||||
+9
-3
@@ -1,7 +1,13 @@
|
||||
import D4H, { GetMembersOptions } from "d4h-typescript"
|
||||
import Config from "./config"
|
||||
// Import environment variables before anything else
|
||||
import * as dotenv from "dotenv"
|
||||
dotenv.config();
|
||||
|
||||
let api = new D4H(Config.d4hToken);
|
||||
import D4H, { GetMembersOptions } from "d4h-typescript"
|
||||
import { env } from "process"
|
||||
|
||||
const token = env["D4H_TOKEN"]!;
|
||||
|
||||
let api = new D4H(token);
|
||||
|
||||
let getMembersOptions: GetMembersOptions = {
|
||||
includeDetails: true,
|
||||
|
||||
+3
-1
@@ -8,9 +8,11 @@
|
||||
"launch": "npm run build && node ./built"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.15.0",
|
||||
"typescript": "^4.8.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"d4h-typescript": "file:../lib"
|
||||
"d4h-typescript": "file:../lib",
|
||||
"dotenv": "^16.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user