diff options
Diffstat (limited to 'main.ts')
-rw-r--r-- | main.ts | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/main.ts b/main.ts index 82d54f8..4fe68ff 100644 --- a/main.ts +++ b/main.ts @@ -2,9 +2,19 @@ import LoginScreen from "./screen/login.ts"; import { build } from "./screenbuilder.ts"; import readline from 'node:readline'; +import * as client from "./client.ts" readline.emitKeypressEvents(process.stdin); if (process.stdin.isTTY) process.stdin.setRawMode(true); // makes the terminal send stdin without the user pressing enter -build(LoginScreen) \ No newline at end of file +let screen; +try { + screen = build(LoginScreen, client); + client.setScreen(screen) +} catch (error) { + console.error(error); + for (const log of screen?.logs ?? []) { + console.log(log) + } +} \ No newline at end of file |