ยท
JDK 18 will come with an embedded mini web server.
It will allow to deal with static files from a directory thanks to command line tool: ๐๐๐๐๐๐๐๐๐๐.
By default, it uses ๐๐๐๐๐๐๐๐๐ and the port 80 and targets the current directory.
The class ๐บ๐๐๐๐๐๐ญ๐๐๐๐บ๐๐๐๐๐ coming with it, lets you instantiate that web server, by code:
var server = SimpleFileServer.createFileServer(
new InetSoketAddress(8080),
Path.of("/some/path"),
Outputlevel.VERBOSE
);
server.start();This tool will be useful for prototyping, ad-hoc coding, and testing purposes, particularly in educational contexts.