I would like to use Undertow as a simple web server to serve the AngularJS application. The rest of the services needed for the AngularJS application are served by Apache Camel, so I will need to serve the Angular application using Undertow.
I read the documentation but can't get it working, any ideas on what I'm doing wrong?
Here is the code I have to start the Underow server
Undertow server = Undertow.builder()
.addHttpListener(8080, "localhost")
.setHandler(resource(new FileResourceManager(new File("../dist"),10))
.addWelcomeFiles("../dist/index.html")
.setDirectoryListingEnabled(true))
.build();
server.start();
source
share