From 4664c36a2aabb71cac80628b7d21670c123e9b4b Mon Sep 17 00:00:00 2001 From: Nikhil Nawgiri Date: Sat, 24 Aug 2024 22:51:54 +0200 Subject: [PATCH] Update config setup --- .gitignore | 2 +- config.js.example | 8 ++++++++ config.json.example | 6 ------ main.ts | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 config.js.example delete mode 100644 config.json.example diff --git a/.gitignore b/.gitignore index 246091c..e3007f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ crypto bot.json -config.json +config.js main.js # Logs diff --git a/config.js.example b/config.js.example new file mode 100644 index 0000000..9e910b4 --- /dev/null +++ b/config.js.example @@ -0,0 +1,8 @@ +module.exports = { + config: { + "homeserverUrl": "", + "accessToken": "", + "storageLocation": "bot.json", + "cryptoFolderLocation": "crypto" + } +} diff --git a/config.json.example b/config.json.example deleted file mode 100644 index 79c9e7c..0000000 --- a/config.json.example +++ /dev/null @@ -1,6 +0,0 @@ -{ - "homeserverUrl": "", - "accessToken": "", - "storageLocation": "bot.json", - "cryptoFolderLocation": "crypto" -} diff --git a/main.ts b/main.ts index 8047aa5..ac1559b 100644 --- a/main.ts +++ b/main.ts @@ -1,4 +1,4 @@ -import * as config from "./config.json"; +import { config } from "./config.js"; const sdk = require("matrix-bot-sdk");