diff options
Diffstat (limited to 'src/command.js')
| -rw-r--r-- | src/command.js | 8 |
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"); }, |
