nitcorn: update address used and style of main doc example
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 19 Jun 2016 13:08:31 +0000 (09:08 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 10 Aug 2016 19:05:45 +0000 (15:05 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/nitcorn/nitcorn.nit

index 2a5b43a..40d02ef 100644 (file)
 # Basic usage example:
 # ~~~~
 # class MyAction
-#      super Action
-#
-#      redef fun answer(http_request, turi)
-#      do
-#              var response = new HttpResponse(200)
-#              response.body = """
-#              <!DOCTYPE html>
-#              <head>
-#                      <meta charset="utf-8">
-#                      <title>Hello World</title>
-#              </head>
-#              <body>
-#                      <p>Hello World</p>
-#              </body>
-#              </html>"""
-#              return response
-#      end
+#     super Action
+#
+#     redef fun answer(http_request, turi)
+#     do
+#         var response = new HttpResponse(200)
+#         response.body = """
+# <!DOCTYPE html>
+# <head>
+#     <meta charset="utf-8">
+#     <title>Hello World</title>
+# </head>
+# <body>
+#     <p>Hello World</p>
+# </body>
+# </html>"""
+#         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)