NodeJS is server side JavaScript. I think that the SpiderMonkey engine, developed by Mozilla, may be an alternative to NodeJS or if you want to get some JavaScript added to
Java then you may be able to use the Rhino engine.
However it appears as though most people/companies and sites are currently using NodeJS for their server side JavaScript engines.
In 2016 SAP adopted the NodeJS and provided a path for SAP developers to migrate from SpiderMonkey to NodeJS.