 
 var dbconfig = DBConfig()
 var animalBackend: Model
+let defaultListenPort = 8123
+var listenPort: Int = defaultListenPort
 
 if let dbuser = getenv("N4L_API_DATABASE_USER") {
     dbconfig.user = String(cString: dbuser)

}
if let oldapi = getenv("N4L_OLDAPI_IMAGES_URL") {
    dbconfig.oldapiUrl = String(cString: oldapi)
}

let db = DBLayer(config: dbconfig)



//  an HTTP server and connect it to the router
Kitura.addHTTPServer(onPort: listenPort, with: mainRouter)

// Start the Kitura runloop (this call never returns)
Kitura.run()
