about summary refs log tree commit diff
path: root/users/Profpatsch/lyric/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/lyric/src/index.ts')
-rw-r--r--users/Profpatsch/lyric/src/index.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/users/Profpatsch/lyric/src/index.ts b/users/Profpatsch/lyric/src/index.ts
new file mode 100644
index 000000000000..6bab1c4590cd
--- /dev/null
+++ b/users/Profpatsch/lyric/src/index.ts
@@ -0,0 +1,16 @@
+import { tapBpm } from "./tap-bpm.js";
+
+async function main() {
+  // subcommand for tap-bpm
+  if (process.argv[2] === "tap-bpm") {
+    await tapBpm();
+  }
+}
+
+await main();
+
+// sleep in a loop to block nodejs
+console.log("Blocking event loop...");
+while (true) {
+  await new Promise((resolve) => setTimeout(resolve, 1000));
+}