It used to be that a lot of SMBs ran their least expensive services on relatively weak VMs with little RAM. No problem for LAMP servers, but Java is pretty hungry.
These days, however, even the bottom tier can generally run Java and some (such as Amazon) actually have special services for running stuff like Spring Boot or
Tomcat instances.
Spring itself has many Modules, so you can use as many or as few of its API's as you need.
As for JavaScript, the more I work with it, the more infuriated I get. Bad enough when I was just struggling with getting it to determine the difference between a null
string, a null object that was supposed to be a string an empty string, a blank string and so forth, but I've been using NodeJS to to my quick-and-dirty webapp servers and the infinitely-deep stacks of callbacks that come from not having a civilised threading architecture are really beginning to get on my nerves.
Any enterprise of any size, however, is likely have a mix of technologies, not only Java and JavaScript but Python, maybe some Ruby and .Net.