News for hackers. Stuff that matters.
Re:Show HN: How to X with Y. Engineering questions, answered by chrisbrauns on Monday October 12, 2020 @09:35AM (#24754179)
Interesting idea. Just a note that the first answer I saw[0] is not correct.

This is given as how to write to a file in Javascript.

const {fs} = require('fs')

fs.writeFileSync('/tmp/myfile.txt', Buffer.from('hello'));

But you can't just do this in plain old JS. It needs to be Node running ES6+

[0]: https://howtoxwithy.com/how-to/b35668da-7cbe-456f-8db5-0d645...

Re:Show HN: How to X with Y. Engineering questions, answered by alex_portabella on Monday October 12, 2020 @09:42AM (#24754235)
That's true. Definitely need a way to distinguish between the two (browser vs. server) sometimes