1
HelpMe
119d

Trying to make a nodejs backend is pure hell. It doesn't contain much builtin functionality in the first place and so you are forced to get a sea of smaller packages to make something that should be already baked in to happen. Momentjs and dayjs has thought nodejs devs nothing about the fact node runtime must not be as restrained as a browser js runtime. Now we are getting temporal api in browser js runtime and hopefully we can finally handle timezone hell without going insane. But this highlights the issue with node. Why wait for it to be included in js standard to finally be a thing. develop it beforehand. why are you beholden to Ecma standard. They write standards for web browser not node backend for god sake.

Also, authentication shouldn't be that complicated. I shouldn't be forced to create my own auth. In laravel scaffolding is already there and is asking you to get it going. In nodejs you have to get jwt working. I understand that you can get such scaffolding online with git clone but why? why express doesn't provide buildtin functions for authentication? Why for gods sake, you "npm install bcrypt"? I have to hash my own password before hand. I mean, realistically speaking nodejs is builtin with cryptography libraries. Hashmap literally uses hashing. Why can't it be builtin. I supposed any API needed auth. Instead I have to sign and verfiy my token and create middlewares for the job of making sure routes are protected.

I like the concept of bidirectional communication of node and the ugly thing, it's not impressive. any goddamn programming language used for web dev should realistically sustain two-way communication. It just a question of scaling, but if you have a backend that leverages usockets you can never go wrong. Because it's written in c. Just keep server running and sending data packets and responding to them, and don't finalize request and clean up after you serve it just keep waiting for new event.

Anyway, I hope out of this confused mess we call nodejs backend comes clean solutions just like Laravel came to clean the mess that was PHP backend back then.

Express is overrated by the way, and mongodb feels like a really ludicrous idea. we now need graphql in goddamn backend because of mongodb and it's cousins of nosql databases.

Comments
  • 4
    Nestjs
  • 0
    Somebody help him
  • 0
    @Lyniven, unfortunately it doesn't have nearly as much jobs as mern stack
  • 1
    @HelpMe I tend to be on the side that decide the stack, so sorry, I don't have that issue.

    I might add, if it's a big, big project with just node or express, probably just refuse the offer and go next
  • 0
    use something like deno as the node's creator stated that node was too low-end for javascript
  • 2
    1. They added a ton of things before they came to the browser, the result is that there are very subtle differences in the operation of Node's crypto API and SubtleCrypto, which make it a pain in the ass to develop libraries for JavaScript. One of Demo's biggest advantages is that it gets to reimplement a lot of Node's features exactly the way they were standardized.

    2. The hash function used in hashmap is almost certainly unsuitable for authentication, that's why you need bcrypt. Not all hash functions are the same.
  • 1
    Solution: just nope out of server-side shitscript. Don’t do it. You don’t have to. Also nope out of client-side shitscript and write the front-end code in any other language. Simple as that.
Add Comment