aboutsummaryrefslogtreecommitdiff
path: root/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'main.ts')
-rw-r--r--main.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/main.ts b/main.ts
index 5c59ea9..b062c1c 100644
--- a/main.ts
+++ b/main.ts
@@ -1,6 +1,3 @@
-import * as path from 'https://deno.land/std@0.102.0/path/mod.ts';
-Deno.chdir(path.dirname(path.fromFileUrl(Deno.mainModule)));
-
import { ParseResult } from "./language/types.ts";
function prettyprintParseResult(input: ParseResult) {
@@ -38,7 +35,7 @@ async function apiTest(api: API) {
// test 1 (direct api)
await (async () => {
var api = new YomikunDirectAPIClient();
- await api.prepare();
+ await api.ready;
console.log("Prepare direct api done");
await apiTest(api);
@@ -49,12 +46,10 @@ console.log("\n".repeat(2));
// test 2 (remote api)
await (async () => {
// default host = localhost:9400
- var server = new YomikunRemoteAPIServer();
- await server.prepare();
- server.start();
+ new YomikunRemoteAPIServer().start();
var api = new YomikunRemoteAPIClient();
- await api.prepare();
+ await api.ready;
console.log("Prepare remote api done");
await apiTest(api);