From fe70598399a568de546bb4a415124d37733b6cf0 Mon Sep 17 00:00:00 2001 From: Chris Plaatjes Date: Wed, 22 Feb 2023 18:00:25 -0500 Subject: [PATCH] Updated to use json config --- index.ts | 6 +++--- tsconfig.json | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tsconfig.json diff --git a/index.ts b/index.ts index f7e4943..d3802d9 100644 --- a/index.ts +++ b/index.ts @@ -6,10 +6,10 @@ import { } from "matrix-bot-sdk"; //import config data -const config = require("./config/config.json"); +import settings from "./config/config.Dev.json"; -const homeserverUrl = config.TeleTokConf.matrixAddress; -const accessToken = config.TeleTokConf.accessToken; +const homeserverUrl = settings.matrixAddress; +const accessToken = settings.accessToken; const storage = new SimpleFsStorageProvider("./config/bot.json"); const cryptoProvider = new RustSdkCryptoStorageProvider("./config/crypto"); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..445cc2a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "module": "commonjs", + "resolveJsonModule": true, + "esModuleInterop": true + } + } \ No newline at end of file