To answer your first question, Tomcat and Node are completely different animals, although you can get Node to accomplish the same goal as Tomcat, if you are agnostic to the programming language that you're going to use and you add the right material on top him.
- Tomcat - Web Server for web applications written in Java .
- Node is a runtime for applications in Javascript .
Therefore, in addition to the difference in the programming language, the comparison you make is actually not the case. You see that Node (plus the main V8 engine) is more equivalent to JVM (Java Virtual Machine) than Tomcat.
You can develop any type of application on Node. A subset of these will be a server, and then a subset of this will be a web server.
Now, perhaps the most commonly used Node web server is Express . I honestly don't know another. I found Express and did not search anywhere else.
So, for comparison, think of it this way:
JVM vs. V8+Node Java vs. Javascript Tomcat vs. Express
As for your second question, yes, you can create a REST API on Node if you add Express on top of it. And the good news is that it is extremely simple. Take a look at this: http://expressjs.com/en/guide/routing.html
Good luck and enjoy learning Node. I had tons. Left Java and never looked back;)
Mig82
source share