Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRoudy Antenor
4,124 PointsPlease explain the concept of NODE.js being a "server"?
I am confused - when i hear the word "server", i think of a tall cabinet filled with rows of equipment called servers - blinking, handling and hosting The Company specific software application which allows it's users/employees - such as an insurance company the ability to access client information, vehicle data, from a program
But when i hear that node.js is a server that we must build/set up - that also hosts our program/application that people can interact with on their personal computers over the internet - i can't seem to understand the concept -
NODE is said to be a platform but what does that mean? Please help?
Does node exist in my editor? Does my node files get sent with HTML, CSS, and Javascript to the user? will my node application have to be uploaded to my GoDaddy hosting accnt?
2 Answers
Steven Parker
231,275 PointsCabinets with rows of blades would be a "server farm", not just a single server but many, and with large storage capability.
As Mark said, a "server" can also be just one machine, or even just some software in a machine, as provided by your hosting vendor. You should check with your vendor to be sure that they support applications developed for node.js.
It depends on your editor, but node is probably not inside it. And the JavaScript code you develop for the server is not sent to the client, but it may generate other components that will be. And finally, yes, assuming it is supported, you will upload your server application to your hosting account and run it there.
Ikuyasu Usui
36 PointsThe Javascript that you learn together with HTML and CSS is written to get run on your browser like Chrome, Safari or Firefox. But the browser doesn't allow you to do many things on your computer other than displaying web pages with some user interactions. For example, you cannot open an application installed on your computer using a browser (or Javascript). Node.js allows you to write a program in Javascript that you can use to do more things on your computer like creating a server. Traditionally, you would need to write the program in different languages like Java, Python, or Pearl to do this although you are already very familiar with Javascript. With Node.js, you can write frontdend and backend programs using only Javascript.
markmneimneh
14,132 Pointsmarkmneimneh
14,132 PointsNo :-)
I have a Tomcat web server, an IIS web server and a node server all running on same machine ....
a server is nothing more than specialized software suite that (JBOSS, IIS, TOMCAT, NODE and so on) that function to serve web requests (in this particular case).
You see them in cabinets with flash lights because unlike my desktop server(s), the cabinets one are designed to serve millions and billions of requests. Mine serve me only :-). These things (the cabinets) can get real hot and they are place to environmentally controlled rooms to keep them cool. If you get a chance to walk into a server room, you will be impressed.
There are web server, file servers, Database servers ... and so on. I also have SQL server and ORACLE server running my 2nd desktop. You don't need a cabinet if the load is light and occasional.
hope this helps.