work on getting env variables working

This commit is contained in:
Daniel Løvbrøtte Olsen 2019-02-26 23:18:36 +01:00
parent 8f1f6efad1
commit 3a8a586e12
2 changed files with 622 additions and 633 deletions

View File

@ -1,11 +1,14 @@
import x2i from "./x2i"; import x2i from "./x2i";
const config = require("./config.json"); // const config = require("./config.json");
const MatrixClient = require("matrix-bot-sdk").MatrixClient; const MatrixClient = require("matrix-bot-sdk").MatrixClient;
const AutojoinRoomsMixin = require("matrix-bot-sdk").AutojoinRoomsMixin; const AutojoinRoomsMixin = require("matrix-bot-sdk").AutojoinRoomsMixin;
const client = new MatrixClient(config.homeserver, config.token); const homeserver = ( /*config.homeserver || process.env.WUG_HOMESERVER ||*/ process.env.MATRIXDEV_HOMESERVER);
const token = (/* config.token || process.env.WUG_TOKEN||*/ process.env.MATRIXDEV_TOKEN);
const client = new MatrixClient(homeserver, token);
AutojoinRoomsMixin.setupOnClient(client); AutojoinRoomsMixin.setupOnClient(client);
const myself = client.getUserId() const myself = client.getUserId()

1248
package-lock.json generated

File diff suppressed because it is too large Load Diff