 
 let app = HexavilleFramework()
 
-let router = Router()
+var router = Router()
 
 app.use(RandomNumberGenerateMiddleware())
 

#endif

extension URLSession {
    func resumeSync(with url: URL) throws -> Data {
        let chan = Channel<(Error?, Data?)>.make(capacity: 1)
        
        let task = self.dataTask(with: url) { data, response, error in

}

router.use(.get, "/random_img") { request, context in
    let data = try URLSession.shared.fetch(with: URL(string: "http://lorempixel.com/400/200/")!)
    return Response(headers: ["Content-Type": "image/png"], body: data.base64EncodedData())
}

