1
0

♻️ Move initialization code to "backend"

This commit is contained in:
2021-06-18 19:04:14 +02:00
parent 13b3bdcb97
commit 41aaec835f
2 changed files with 20 additions and 19 deletions

18
src/backend/index.ts Normal file
View File

@@ -0,0 +1,18 @@
import { getApiClient, getAuthProvider } from "./helpers/twitch";
import { connect } from "./chatClient";
import { listen } from "./webServer";
import { registerUserListener } from "./pubSubClient";
const channel = "alexbcberio";
export async function bootstrap() {
const apiClient = await getApiClient();
await registerUserListener(apiClient, channel);
const authProvider = await getAuthProvider();
await connect(authProvider, [channel]);
listen();
}