aboutsummaryrefslogtreecommitdiff
path: root/main.ts
diff options
context:
space:
mode:
authorFridon <[email protected]>2022-06-23 00:01:12 +0400
committerFridon <[email protected]>2022-06-23 00:01:12 +0400
commit7d72153d68ea4c682266f0301aa45b4e3a9e45a9 (patch)
treeba2b4b8937d0c7785a468fae18880762a5e6b484 /main.ts
parentbe829dad070205555c514ff497fcf2eae355a6e2 (diff)
downloadcountryfetch-7d72153d68ea4c682266f0301aa45b4e3a9e45a9.tar.xz
countryfetch-7d72153d68ea4c682266f0301aa45b4e3a9e45a9.zip
big refactor + raw option
Diffstat (limited to 'main.ts')
-rw-r--r--main.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.ts b/main.ts
index 8c8819d..fc26c20 100644
--- a/main.ts
+++ b/main.ts
@@ -1,3 +1,12 @@
-import { app } from "./src/app.ts";
+import { App } from "./src/app.ts";
+import { Logger } from "./src/util/logger.ts";
+import { Cache } from "./src/util/cache.ts";
+import { Countries } from "./src/countries.ts";
-await app();
+// I wanted to get the hang of OOP but this feels regrettable
+const logger = new Logger();
+const cache = new Cache();
+const countries = new Countries(cache, logger);
+const app = new App(logger, countries);
+
+await app.run();