JSWEBSERVER is a very light web server app that can be compiled in Java 1.8 or Java 16, it is based on SCALATRA (https://scalatra.org/) and GRAALVM for Java(https://www.graalvm.org/java/) with JavaScript engine.
To know more about graalvm with java, it is recommended to watch this video: https://inside.java/2019/06/26/graalvmforjavadevs/
The point here is to show that with the tools now we have, it is very easy to implement a web server similar to nodejs and I mean similar because all the server side scripts are using JavaScript but using your own way to implement it.
JSWEBSERVER Home: https://sourceforge.net/projects/jswebserver/
JSWEBSERVER Features:
There is one thing pending and it is the REST API, in the near future it is thought it will be possible to use JSWEBSERVER to create REST API.