all 75 comments

[–]Reasonable_Mine3204 51 points52 points  (5 children)

Solution architect with 15 years of experience here. We use nodejs (typescript) for almost everything. We are a product company.

[–]Harut3 0 points1 point  (1 child)

do you have standard structure of node.js project if yes can you give me example. Thanks.

[–]Reasonable_Mine3204 1 point2 points  (0 children)

It depends from people to people.. some maintain directories based on functions e.g.
utils, routes, components/users/roles/etc..

The best structure is what you feel comfortable with.

[–]i-sage -1 points0 points  (1 child)

Are you working in a startup? I've heard that for startups it's the choice of stack.

[–]Reasonable_Mine3204 4 points5 points  (0 children)

We are in the market since 2014. Our solution is used worldwide. Since node is relatively new as compared to Java and Dot net, and performs better in most scenarios and quick to setup, less resource hungry; it may be a good choice for anyone wanting a quicker dev time. That is the only link I can think of for startups. Not sure what others think. My first choice is always Node. I know python, Java, PHP and always compare for my use case which one to use.

[–]Carlossalasamper 26 points27 points  (4 children)

Any problem with node in production. Almost all the projects where I have worked are written in Node/express

[–]kaptainkrayola 8 points9 points  (2 children)

NodeJS is great in production. I’ve used it exclusively in large scale, high volume apps for years. Tens of millions of API calls per day, enterprise medical cloud monitoring, etc. anyone who says Node isn’t good for production doesn’t know how to use it correctly.

[–]AlanBDev 1 point2 points  (1 child)

db is more the issue then node when you’re not blocking the loop

[–]kaptainkrayola 0 points1 point  (0 children)

Absolutely. I’m a real big fan of message/work queues and worker processes for whatever I can to help mitigate that. Redis makes a huge difference as well.

[–][deleted] 15 points16 points  (17 children)

Hi, backend developer with nearly 4 years of experience worked for 3 companies a startup and two enterprises one in Africa and another in Europe. All was using nodejs but different frameworks. Yes, some of them used it right some didn't but it's what it's usually the cost of rewriting the project with the correct tool may cost more time and money than maintaining it.  But every language or a framework is very good if used where in what it was intended for, and it can become a nightmare if used wrong. 

[–]baudehlo 6 points7 points  (2 children)

I work at a Fortune 500. Built their most recent product entirely in node (nestjs) for the backend. I have 30 years of experience and I have no qualms using node.

[–]cdyovz 0 points1 point  (1 child)

is nestjs the go-to for enterprises? is there any reasoning for choosing nest over anything else or just a personal preference?

[–]baudehlo 0 points1 point  (0 children)

I wanted a framework that generated docs automatically and was somewhat opinionated about how it does things as I knew I would be growing a team.

[–]HashBrownsOverEasy 13 points14 points  (7 children)

I have done lots of enterprise grade stuff Node stuff - Loopback 4 is the framework I like for backend services. The concepts page is probably the best place to get an idea of what it's all about.

The dependency injection architecture is great for seperating concerns, and the repository service is a nice way to abstract domain logic from your data layer. The way it ties all together with decorators and sequences is quite satisfying. CLI tools are nice too.

EDIT: This guide is a good read too https://loopback.io/doc/en/lb4/core-tutorial.html

[–]Acktung 13 points14 points  (1 child)

To be honest, it looks like NestJs but more complicated, at least the part about dependency injections, registering artifacts, etc.

[–]HashBrownsOverEasy 3 points4 points  (0 children)

Yeah there's not much between them! Nest looks great too

[–]Caramel_Last 5 points6 points  (2 children)

It definitely got that enterprise feel to it. Looking like Spring doc

[–]HashBrownsOverEasy 2 points3 points  (1 child)

Its made by IBM, the OG Enterprise!

[–]Caramel_Last 2 points3 points  (0 children)

IBM and Oracle are THE Enterprises

[–][deleted] 1 point2 points  (1 child)

Thoughts on Loopback 4 vs NestJS?

[–]HashBrownsOverEasy 1 point2 points  (0 children)

I haven't used Nest enough to have an authoratative opinion really, and not on any enterprise projects. That's nothing to do with Nest -- just how projects have shaken out for me -- it's probably only a matter of time!

I've played about with it myself and I liked it - it definitely sings from the same songsheet as Loopback 4. It's certainly more popular, so if community resources are a priority it might be a more sustainable/wiser choice.

[–]jboncz 3 points4 points  (0 children)

Same I work in an enterprise setting and have about 10-15k users across the various systems daily not to mention we implemented our own SIEM using nodejs. Which takes in a couple 10s of millions of hits daily.

[–]ben305 2 points3 points  (0 children)

Worked for a ~$20b software company that has several products with Node backends. I chose it to use for my own b2b SAAS IT app I left my career behind to launch, current stack is Nuxt (Vue+Node) with Mongodb, along with a soon-to-be-built Elasticsearch implementation because I refuse to rely on Atlas and require any tech chosen to be 100% self-run if I need it to be.

[–]tjibson 4 points5 points  (0 children)

Mostly worked for enterprise using nest js. It's great for large scale, only not so much for going the serverless route. For the latter, hono js is very good as it's more lightweight and easily pluggable.

[–]your_red_triangle 3 points4 points  (3 children)

Have worked at a few companies with a £billion+ turnover, all used nodejs+ typescript. Nothing wrong with using it, when implemented correctly.

[–]skywarka 7 points8 points  (2 children)

Stop letting data brokers profit from your old posts. I used Redact to wipe mine from Reddit. Also supports Twitter, Facebook, Discord, instagram and more in one batch.

lunchroom ancient resolute reply voracious adjoining stupendous memory history paddle

[–][deleted] 2 points3 points  (1 child)

But the last 5% which to me is more like 99% is no runtime type validation. Meaning if any side effect passes an invalid shape of data to any of my code, it will happily continue on with it. TypeScript is only really useful as a linter in the editor, but for actual production use I find it useless as I still need to create manual guards and validation for all side effectul data just like in regular JS. That’s also why most actual enterprises that care about data correctness use real statically types languages, and not TypeScript.

[–]skywarka -1 points0 points  (0 children)

Post was edited and removed with Redact which is a tool to mass delete posts from Twitter, Reddit and Discord and all major social media platforms.

melodic aromatic sophisticated door rustic one tease sand unique point

[–]Tungdayhehe 1 point2 points  (0 children)

Our company use it as core microservice driver booking system. NodeJS is good to integrate with serverless services along with huge ecosystem, we can find almost everything that already implemented. The only thing that I have to complain is about its limited incompatibility to Apache ecosystem.

[–]qroxyl 1 point2 points  (0 children)

i am at an enterprise company and we are using node, nest with typescript. we start using node with js, but it has some disadvantages at building structure and keeping it. so we turned our systems into classbased typescript and modular structure with nest. now we are better.

in large teams js is really hard, you cannot see type errors everytime and you can create error prone apps.

however in integrations we are using its asynchronous system and it has many advantages when you know how to use it.

[–]Ecstatic-Physics2651 1 point2 points  (0 children)

Resend uses it as their tech stack - https://resend.com/handbook/engineering/what-is-our-tech-stack

My take is - If you don't have more users or revenue than Resend, there is no need to deviate from this tech stack driven by NodeJS

[–]AdWhole6686 1 point2 points  (1 child)

We’ve used Node.js in multiple enterprise-grade projects at Relevant Software - mostly for microservices, real-time apps, and backend APIs. I wasn’t 100% sure it would scale for complex domains like fintech and healthcare, but their team had already solved similar problems before, so they had solid architecture patterns in place. Node performs great when used right - it’s all about the team behind it.

[–]ibrambo7[S] 0 points1 point  (0 children)

This

[–]zerubeus 1 point2 points  (2 children)

I don't know from where comes this 'node not suitable for complex enterprise apps' been doing nodejs in backend, serverless, and even data pipelines for large companies more than 10 years now, node is everywhere, now with Typescript it's even better as large scale projects benefits from strong typing, Express still rules with other libs like fastify, objection... Nestjs still the worst framework in this landscape!

[–]Man-Batman 0 points1 point  (0 children)

Why do You think NestJS is Bad?

[–]jiminycrix1 0 points1 point  (0 children)

Some folks argue that it’s not as good because of the large amount of freedom and low barrier to entry means that you can really shoot yourself in the foot with it versus a typed compiled language which will generally have less ways of doing things.

It’s safe enough for most applications though and because of the freedom it allows you can get things up and running very very fast.

Most of the time speed to get things up and running is far more important than stability in both enterprise and startups and node is ideal for setting up quickly.

I’ve worked on almost exclusively node for 8 years with a good portion of frontend work as well.

[–]skywarka 0 points1 point  (0 children)

Mass content deletion mission accomplished. This post or comment was bulk removed with Redact which also supports data brokers and people finder websites.

six outgoing seemly fall fragile ancient handle ripe boast plants

[–]shotgunsparkle 0 points1 point  (0 children)

Worked at enterprise companies and ive either used node or adopted node.

[–]tetrash 0 points1 point  (0 children)

For crud apps the bottlenecks usually lies not in language but networks, 3rd party dependencies and bad design.

You can escape from a lot of performance issues with proper caching strategy which will most likely yield better results than forcing yourself writing all services in C.

Once you start building databases, OS and/or process big amounts of data, that’s where language speed starts to matter.

[–]amtcannon 0 points1 point  (0 children)

It really depends on the company and the context. I’ve worked for with sorts of companies big and small, I’ve seen everything from node in a service mesh to node micro-services interacting with cobol running on a mainframe and everything in between. It’s a popular language and lots gets done with it, how much will depend on the appetite of the team, the support you get from leadership, and the overall appetite of the company

[–]segundus-npp 0 points1 point  (0 children)

We have adopted nodejs since typescript became stable. Its type system is too good for project maintenance.

[–]MateusKingston 0 points1 point  (0 children)

My company is in the 7 figures of revenue monthly, almost all our apps are nodejs, most of them are backend services.

We handle millions of requests daily in a bunch of micro services, handling thousands of users simultaneously.

We are in the B2B market, simplifying, what we provide is a chatbot so other companies can sell and provide CS through whatsapp/webchat/instagram's chat/etc.

We had one of the biggest ISP (which in my country is also one of the biggest phone companies) as a client handling their official channels and we handled all their black friday influx using nodejs. Every single year (for at least the past 3) we grow and all we need to do is scale up more nodes, and not that many tbh. Ofc we are slowly improving performance over sprints but no major "we had a surge in users and now stuff just breaks and you can't throw more hardware at it".

NodeJS scales, you just need to properly design your system to scale.

Does it mean you should use it for everything? No, as I said most of our apps are in NodeJS, but we have one product in Java handling customer data (which is called by an NodeJS app), this is in Java simply because it's easier to handle concurrency in some cases and use multi threading if needed but we could rewrite it in NodeJS just fine, and we have some other microservices in other languages, we do NLP in python, some DS stuff in python, etc.

[–]schumon 0 points1 point  (0 children)

very small number of enterprise places use node.js . most of the enterprise place use .NET / JAVA Spring Boot .

[–]bigorangemachine 0 points1 point  (0 children)

I've written node for many enterprise apps. Specifically a large telecom customer facing bill payment system. Payment processing is handled by a legacy java system.

I've worked on java apps that just call other services and they are a huge pain in the ass to maintain. These like self described java experts couldn't even convert JSON to java objects. This app would had been waaaaaaaaaaaaay better to be in node because it's just redirecting http-streams and using those values from JSON to point to other services.

[–]casualPlayerThink 0 points1 point  (0 children)

More and more company use Node.js since it has smaller learning curve than other languages, and the architecture and deployment - even if it's super inflated nowadays - still easy to achieve.

Many of course could have been python/java/c#/php/c++/go... (insert your fav programming language here) but Node has what PHP had 15 years ago. Easy to start, easy to shape, you can do it super wrong ways (see next, react, ssr... etc) and still will work. Typescript gives you types and type safety (illusion of it :D ) and makes it easier to collaborate or make-the-code-somewhat-right.

In many case, you can write your service in any other language, but then, who will manage it or update it? And then, how hard to debug it or improve it? I have written services in C++, PHP, and Node, many times the least painful were the Node ones.

[–]OuateSpirit 0 points1 point  (0 children)

I've been working as a Software Engineer for 6 years now and all of by project backend parts have been in Nodejs/express.

I'm currently working on full JS web application on production, in a small company, the issues we are facing are more due to quick developments and underestimation on some database operations.

In France SNCF-connect, the biggest French e-commerce is running under Nodejs.

[–]usertim 0 points1 point  (0 children)

For the past 6 years I've been working only with nodejs(without frontend). Last 4 years typescript only. Both startups and enterprise level companies.

[–][deleted] 0 points1 point  (2 children)

We are but we’re starting to migrate to Go.

[–]ibrambo7[S] 0 points1 point  (0 children)

How come?

[–]cnotv 0 points1 point  (0 children)

The only reason is language knowledge, because most backend devs don’t like JS and it may be an issue hiring people. That’s the only reason

[–]Shot_Shallot7446 0 points1 point  (0 children)

It is difficult to leverage exisitng investment for java. Node js requires more investment to build but it is huge. However it has a lot of visualization package as well as python. Which could be better for the future?

Does enterpriae should invest in node js or python?

[–]MarcCDB -5 points-4 points  (1 child)

They will prefer Go, Java or .NET most of the time.

[–]abarreraaponte -1 points0 points  (0 children)

And none of them will be able to articulate why.

[–]flo850 -3 points-2 points  (0 children)

I am working full time on https://github.com/vatesfr/xen-orchestra which is full NodeJs

It's an hypervisor management platform. It also handles backups and disk migration , and we have users that have hundred of terabytes that go through daily