Merge: doc: fixed some typos and other misc. corrections
[nit.git] / lib / nitcorn / server_config.nit
index c2bd614..3cf51ff 100644 (file)
@@ -25,7 +25,7 @@ class ServerConfig
        var virtual_hosts = new VirtualHosts(self)
 
        # Default `VirtualHost` to respond to requests not handled by any of the `virtual_hosts`
-       var default_virtual_host: nullable VirtualHost = null
+       var default_virtual_host: nullable VirtualHost = null is writable
 end
 
 # A `VirtualHost` configuration
@@ -61,6 +61,12 @@ class Route
        # Path to this action present in the URI
        var path: nullable String
 
+       init
+       do
+               var path = path
+               if path != null then self.path = "/" / path
+       end
+
        # `Action` to activate when this route is traveled
        var handler: Action
 end
@@ -76,7 +82,7 @@ class Interfaces
        super Array[Interface]
 
        # Back reference to the associtated `VirtualHost`
-       var vh: VirtualHost
+       var virtual_host: VirtualHost
 
        # Add an `Interface` described by `text` formatted as `interface.name.com:port`
        fun add_from_string(text: String)