mime-chat/src/main.ts
Andrew Gundersen 531a32a5a5 updated protocols
2021-07-11 11:54:39 -05:00

28 lines
743 B
TypeScript

/**
* Where the background logic really begins, gets called by app.onReady().
*
* Handles authentication. If profile is set, we launch a session, which consis
* of opening a connection with the platform, initializing the audio streams.
*
* The session is primarily an interface between the frontend and the platform,
* relaying messages from one to the other.
*
*/
import initIpcMain from "@/ipc/index";
import { accountAuth } from "./account";
import createWindow from "./window";
export default async function main() {
/* initiate controls for frontend to use when needed */
initIpcMain();
/* launch browser window */
await createWindow();
/* try to authenticate with token */
await accountAuth();
}