it's em!
Drop permissions
I'd like to harden my deno app a bit, but specifying permissions manually gets repetitive. Is there a way for me to run with -A, parse my configs, and then drop all permissions I don't need before loading the rest of the app? Ex. the configuration will contain a database path, so I should keep the r/w permissions for that, but not any other files.
5 replies
Importing internal modules
I would like to use https://github.com/denoland/deno/blob/main/ext/console/01_console.js in my code, but it can't be directly imported from ext: because i'm writing a normal program and not working on the deno cli itself :P Do i just have to vendor and patch it? I'd really rather not.
5 replies
How can I flush a stream to a response?
I'm trying to stream a response but it appears that data is only sent after either a newline is written or some buffer is filled. Is there a way to manually flush the buffer?
To repro, run this with
--allow-net
, then observe the difference in behavior between curl http://127.0.0.1:8000/%0a
and curl http://127.0.0.1:8000/%20
.
7 replies