A hello world with spark:
get(new Route("/hello") {
@Override
public Object handle(Request request, Response response) {
response.type("text/html");
return "<h1>Hello Spark MVC Framework!</h1>";
}
});
How can I return a static file index.html instead?
Notes:
- I need this index.html to be in the jar
- in the spirit of simplicity of spark java, I'd like to avoid as much as possible going through templates, that would be overkill for a static page.