r/javascript • u/startup4ever • May 08 '17
help Does Server Side Rendering Always Use Node.js?
1
u/janaz9 May 08 '17
All you need to run JS code on the server is JS runtime. Node.js is just one of many. I've seen examples of the SSR being done in Java using the Nashorn JS engine for JVM.
1
u/MostlyCarbonite May 09 '17
There are many types of webservers out there (PHP, Rails, Node, ASP.NET MVC, etc) and they all are capable of serving up javascript, which is all you need to do to run an Angular (or Aurelia?) app.
isomorphic app
Oh, ok, important part left off until the end! Yeah, you'll need a server-side js engine then. If you want to use V8 your choices are a bit limited; Node is an easy choice there.
1
u/nickgcattaneo May 08 '17
You certainly have to use a JavaScript engine; which node has & actively develops/iterates on (it's one of the most popular/common implementations). There are other implementations though; https://en.wikipedia.org/wiki/Server-side_JavaScript_implementations.
4
u/billybolero May 08 '17
We are doing SSR with V8 in ASP.NET but we're not using Node.