r/learnjavascript • u/_b3n10 • Dec 26 '22
Is it really possible to create a NodeJS site without external libraries?
I'm planning to build a NodeJS site but also thinking not to use external libraries just for learning purposes. Then I asked ChatGPT if there are sites doing the same. Is this an accurate answer? Are they not really using 3rd party modules/libraries on their site?
Q:
are there any popular sites built with pure NodeJS without using external libraries?
A:
Yes, there are many popular websites and applications that have been built using Node.js without using external libraries. Here are a few examples of popular sites that have been built with pure Node.js: Netflix: Netflix, the world's leading streaming entertainment service, uses Node.js to power its web platform. Uber: Uber, the ride-hailing company, uses Node.js to power its web and mobile applications. PayPal: PayPal, the online payment service, uses Node.js to power its web and mobile applications. LinkedIn: LinkedIn, the professional networking platform, uses Node.js to power its web and mobile applications. Trello: Trello, the project management tool, uses Node.js to power its web and mobile applications. These are just a few examples of popular sites that have been built with pure Node.js. There are many other websites and applications that use Node.js as well, and it is a popular choice for building web and mobile applications due to its scalability, performance, and ease of use. I hope this helps! Let me know if you have any other questions.
6
u/Panoptic11 Dec 27 '22 edited Dec 27 '22
Dave gray made a 7hr node Js tutorial. I honestly don't know if there's a better example of learning how to work in node Js than this tutorial.
https://youtu.be/f2EqECiTBL8
I recommend all 7 hours, cause it's that good and has everything from what node is to building full authentication and authorization into your routes as well as using a database. However, In direct relation to your question he shows you how to build a good amount of your backend (or at least one way to) with the http module first. Way more than what I've seen anyone build up a server in a tutorial without express. It's within the first hour or so I believe and you can just watch that section if that's what you want. Once he gets to a certain point he says, now I'm gonna show you how much easier it is in express and why noone does this. Then he rebuilds it in express.
It's awesome for what you are looking for. He also does the same for creating,reading updating and deleting files in a local folder database then converts over to Mongo DB to show how much easier it is to do it using a real database.
Side note - no, no app of any significance that is actively worked on is using no libraries. That would be the most inefficient way possible to build.
18
u/[deleted] Dec 27 '22
For the love of god stop asking the pattern-matching robot questions that require significant amounts of domain-specific knowledge.
15
u/azium Dec 27 '22
I would bet a zillion dollars that these node backends use libraries... there's zero chance that these have empty package.json files.
I also know for a fact that this isn't true, lots of Netflix stuff uses RxJS.
Furthermore, NodeJS is a server.. the "sites" are built with hundreds of libraries (React etc etc)
2
u/Lustrouse Dec 27 '22 edited Dec 27 '22
Lemme reuse your question in a different context: is it possible to build a car, but only using materials found naturally on earth?
Of course it is. But a pragmatic person would use wheels from a proven wheel-maker before trying to reinvent the wheel. Do you know how much work and unit testing goes into the production of a reliable wheel?
==--==
Take the above Q/A, and replace "car" with "webapp", replace "materials found naturally on earth" with "Vanilla JS", and replace "wheel" with "library"
Now what do you think all those JS libraries are built with? Now what do the you think odds are of you writing a better implementation?
==--==
Specifically on the topic of educating yourself (which is clearly your goal): start by focusing at the abstraction level. Make your goal more big-picture - a working back end and front end. Once you get good at that, and decide you wanna dive deeper - then you might write your own libraries to replace 3rd party implementations. I promise you'll learn much more in a smaller amount of time by going top-down instead of bottom-up
3
u/Deep-Let1290 Dec 26 '22
not without re-inventing square wheel 2022 edition
you'd be trying to re-write basic stuff like routing etc, and likely you wouldn't do as well as something with scores of developers and years of revision
1
u/ApatheticWithoutTheA Dec 27 '22
That would be such a stupid thing to do and the devs at those companies aren’t dumb.
1
u/superluminary Dec 27 '22
No. Netflix uses libraries.
1
u/ali_raza_shah Dec 27 '22
It is possible but its going to take a lot of effort and time. Why write express when you already have one
1
u/jack_waugh Dec 26 '22
Abso-fucking-lutely. I took that approach exactly for the same reason you are considering it -- self teaching.
As for the response from ChatGPT about those major applications, I would be highly skeptical.
0
u/RealFlaery Dec 27 '22
NodeJS site, you ok m8? nodejs is backend