stav / kingbot

Deno CLI trading robot
https://stav.github.io/kingbot/
2 stars 0 forks source link

Streamline Start-up #4

Closed stav closed 2 years ago

stav commented 2 years ago

When the app starts it should not require any Deno permissions, for example "read".

error: Uncaught (in promise) PermissionDenied: Requires read access to ".config/local.yaml", run again with the --allow-read flag
const content = await Deno.readTextFile('.config/local.yaml')
                ^
    at async open (deno:runtime/js/40_files.js:51:17)
    at async readFile (deno:runtime/js/40_read_file.js:25:18)
    at async Object.readTextFile (deno:runtime/js/40_read_file.js:43:24)
    at async file:///home/stav/Work/KingBot/kingbot/src/lib/config.ts:5:17
stav commented 2 years ago

Added prime function Feb 16th:

https://github.com/stav/kingbot/blob/29745225a19f3e12eaf483142f758fad44dd6d61/src/bot/count.ts#L42-L45