summaryrefslogtreecommitdiff
path: root/src/command.js
diff options
context:
space:
mode:
authorLeo Goetz <dev@leogtz.de>2025-11-10 10:26:15 +0100
committerLeo Goetz <dev@leogtz.de>2025-11-10 10:26:15 +0100
commit51cead8d816d16cc025e4a189040bca7c0dc3729 (patch)
tree2da07e9f5d2224006677460bc29737aa42acdace /src/command.js
parent789d28b83af165258dc7e8b3a44bbd2d48fcc370 (diff)
completed course
Diffstat (limited to 'src/command.js')
-rw-r--r--src/command.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/command.js b/src/command.js
index c022c81..b2f7091 100644
--- a/src/command.js
+++ b/src/command.js
@@ -8,6 +8,7 @@ import {
removeNote,
} from "./notes.js";
import { listNotes } from "./utils.js";
+import { start } from "./server.js";
yargs(hideBin(process.argv))
.command(
@@ -78,13 +79,16 @@ yargs(hideBin(process.argv))
type: "number",
});
},
- async (argv) => {},
+ async (argv) => {
+ const notes = await getAllNotes();
+ start(notes, argv.port);
+ },
)
.command(
"clean",
"remove all notes",
() => {},
- async (argv) => {
+ async () => {
await removeAllNotes();
console.log("db reseted");
},