 import libc
 import MediaType
 
+public let VERSION = "0.8.0"
+
 public class Application {
-    public static let VERSION = "0.8.0"
-
     /**
         The router driver is responsible
         for returning registered `Route` handlers
         for a given request.
     */
-    public var router: RouterDriver = BranchRouter()
-
-    /**
-        The server driver is responsible
-        for handling connections on the desired port.
-        This property is constant since it cannot
-        be changed after the server has been booted.
-    */
-    public var server: Server?
+    public let router: RouterDriver
+
+    /**
+        When starting the application, the server will attempt to be initialized
+        from the given type
+    */
+    public let serverType: Server.Type
 
     /**
         The session driver is responsible for


        bootRoutes()

        if config.environment == .production {
            Log.info("Production environment detected, disabling information logs.")
            Log.enabledLevels = [.error, .fatal]
        }

        do {
            Log.info("Server starting on \(host):\(port)")

            let server: Server
            if let presetServer = self.server {
                server = presetServer
            } else {
                server = try HTTPStreamServer<ServerSocket>(
                    host: host,
                    port: port,
                    responder: self
                )
                self.server = server
            }

            try server.start()
        } catch {
            Log.error("Server start error: \(error)")
        }

        folders are stored. This is normally `./` if
        you are running Vapor using `.build/xxx/App`
    */
    public let workDir: String

    /**
        `Middleware` will be applied in the order
        it is set in this array.

        Make sure to append your custom `Middleware`
        if you don't want to overwrite default behavior.
     */
    public var globalMiddleware: [Middleware]

    /**
        Provider classes that have been registered
        with this application
     */
    public var providers: [Provider] = []

    /**
        Resources directory relative to workDir
