diff --git a/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt b/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt index c5e3574360..150cd17d52 100644 --- a/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt +++ b/src/main/kotlin/com/r3corda/demos/api/InterestRateSwapAPI.kt @@ -110,4 +110,23 @@ class InterestRateSwapAPI(val services: ServiceHub) { services.invokeProtocolAsync(ExitServerProtocol.Broadcast::class.java, 83).get() return Response.ok().build() } + + @GET + //@Path("{ref: .*(.html|.css|.js|.png|.jpg|.gif)}") + @Path("web") + @Produces(MediaType.TEXT_HTML) + fun serveWeb() : Response { + try + { + val resourcePath = "/web/index.html" + val resource = javaClass.getResourceAsStream(resourcePath) + println(resource); + return Response.ok(resource, MediaType.TEXT_HTML_TYPE).build() + } + catch(ex: Exception) + { + return Response.status(Response.Status.NOT_FOUND).build() + } + + } }