From 51cead8d816d16cc025e4a189040bca7c0dc3729 Mon Sep 17 00:00:00 2001 From: Leo Goetz Date: Mon, 10 Nov 2025 10:26:15 +0100 Subject: completed course --- src/command.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/command.js') 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"); }, -- cgit v1.3