Hacker News new | ask | show | jobs
by epolanski 1303 days ago
I love writing no framework/no lib backends in nothing but Node.js and TypeScript with some fp-ts and io-ts on top of that.

Node's standard libraries (http, fs, etc) give you already enough to work with.

Sure, you're going to have to re-implement plenty of things (e.g. file serving, which anyway isn't great in node), and many other things but there's plenty of pros:

- you can always understand how things work and change them to suit your use cases. That's just not the case with external tools. Good luck figuring out the codebases or even be able to build them locally

- it's much better for educational purposes to understand how things fit together and are supposed to work

The biggest con: security. Libraries and frameworks likely patch many vulnerabilities you didn't even know existed. This alone pushes me off from this approach and instead I fall back to some bloated framework, but security is important.

The second biggest con: performance. You're likely gonna do plenty of performance mistakes if you don't have a good knowledge of how Node really works.