X-Git-Url: http://nitlanguage.org diff --git a/lib/nitcorn/nitcorn.nit b/lib/nitcorn/nitcorn.nit index ff54508..013eb84 100644 --- a/lib/nitcorn/nitcorn.nit +++ b/lib/nitcorn/nitcorn.nit @@ -25,26 +25,27 @@ # Basic usage example: # ~~~~ # class MyAction -# super Action +# super Action # -# redef fun answer(http_request, turi) -# do -# var response = new HttpResponse(200) -# response.body = """ -# -# -# -# Hello World -# -# -#

Hello World

-# -# """ -# return response -# end +# redef fun answer(http_request, turi) +# do +# var response = new HttpResponse(200) +# response.body = """ +# +# +# +# Hello World +# +# +#

Hello World

+# +# """ +# return response +# end # end # -# var vh = new VirtualHost("localhost:80") +# # Listen to port 8080 on all interfaces +# var vh = new VirtualHost("0.0.0.0:8080") # # # Serve index.html with our custom handler # vh.routes.add new Route("/index.html", new MyAction) @@ -61,4 +62,4 @@ module nitcorn import reactor import file_server import sessions -import proxy +import signal_handler