I took a quick look at their auth docs, and while the docs seem pretty detailed, I noticed it involves multiple packages (@nestjs/passport, passport, passport-local, and their corresponding types) that you then have to glue together into a full solution. The instructions also apparently only show you how to store passwords in plain text, and using something like bcrypt to do it yourself is an exercise left to the reader. Not rocket science, as this [1] (older) article pointed out, it's hard finding quality auth-related tutorials in the Node ecosystem. With Django a lot of this stuff is built-in and solidly implemented. Granted, this was after a quick look at the docs, so my impression might be off.
[0] https://docs.nestjs.com/security/authentication
[1] https://hackernoon.com/your-node-js-authentication-tutorial-...
/* * @type {Map<String, Number>} */
const map = new Map();
Like that.
Express JS is still shit, koajs and fastify are a little better, I used to use nodejs's internal http and https libraries directly but these days uwebsockets.js is what you'd want since it's mature enough already (used by top crypto exchanges).
https://github.com/uNetworking/uWebSockets.js/
And oh it comes with TS types which are cool.
[0] https://github.com/blitz-js/blitz [1] https://github.com/redwoodjs/redwood
I love typescript, but the ecosystem is without a doubt one of the biggest detractors.
All the problems I've had were with JS and npm. TS has been amazing and worked flawlessly. I just can't understand your experience at all.
With regards to TS, generally, it takes a lot of effort to get it to work. More often than not, getting to that point in a way that is actually useful/practical and cost effective, requires yet another library to be installed.
Just look at the TSLint/ESLint migration problems, the popularity of all those TS runners such as ts-node/ts-node-dev/tsx-watch/ts-babel/etc., the complete lack of interoperability between all those separate pieces.
Many issues and even proposed fixes to parts of the TS ecosystem - which is all community ran - are either ignored, left open because no one seems to be able to figure it out, or deemed to be out of scope.
I don't know how to fix this honestly. Some leadership from Microsoft would be a good start.
I really do not understand how convoluted javascript frameworks that require a thousand tools and checkers and dependencies just to put up a hello world are sold as "easier choices", specially when there is no mention of SPAs anywhere.
Is it that hard to deliver static or dynamic HTML+CSS?
Yes, they might not match Rust down to the microsecond or byte count, it doesn't matter in distributed computing.
There are bigger fishes to fry as distributed computing problems.
And Rust type system for preventing data races among threads doesn't help when what is being used is distributed IPC across a cluster nodes.
At one point I did a comparison between a mono/Nancy web service and the same web service, feature for feature, built in NodeJS, Rust/rocket, and Go. I built a few different endpoints that did different types of work and load tested them, profiled memory usage, etc. I know mono and perhaps Nancy weren't the best point of comparison, and it's been some time since, but Rust/rocket really impressed me then, including on axes like ease of development and code readability. The perf deltas I saw could matter quite a bit at scale, allowing for fewer/cheaper servers.
I've enjoyed using Rust for a few things since, personally, and am so far pretty unbothered by its shortcomings.
The last time I tried to use the JS/TS dev tools, I wasted many hours because the tools did zero validation of config files. All of the tools happily silently ignore misspelled config key names and invalid values. This makes simply debugging the tools a huge time sink.
I'm still choosing to write some web stuff in Rust for the experience, for the fact I can compile parts to .wasm and re-use them in a browser too, I enjoy tuning things for performance, and I am not under time constraints for it.