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:
JVM vs. V8+Node
Java vs. Javascript
Tomcat vs. Express
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 ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With