I am new to Node and still going through it. I have some doubts:
- Being a server-side framework, how is it different than Tomcat?
- If I am producing some REST APIs, can I host them on a Node server or do I need another server?
I am new to Node and still going through it. I have some doubts:
To answer your first question, Tomcat and Node are completely different beasts, although you can get Node to serve the same purpose as Tomcat if you're agnostic to the programming language you're going to use and you add the right stuff on top of it.
So apart from the difference in the programming language, the comparison you're making is not really even. You see, Node (plus the underlying V8 engine) is more of the equivalent of the JVM (Java Virtual Machine) than Tomcat.
You can develop any type of application on Node. A subset of those will be server applications, and then a subset of that will be web server applications.
Now, perhaps the most commonly used web server on Node is Express. I honestly don't know of another. I found Express and never looked for anything else.
So, for the purpose of comparison, think of it like this:
As for your second question, yes you can build REST API's on Node, provided you add Express on top of it. And the good news is that it is extremely simple. Have a look at this: http://expressjs.com/en/guide/routing.html
Good luck and have fun learning Node. I had tons. Left Java and never looked back ;)