Closed gurugeek closed 4 years ago
alright to fix it you need to wrap the connection in execute
execute { redis.connect(host: "localhost", port: 6379) { (redisError: NSError?) in if let error = redisError { print(error) } else { print("Connected to Redis") } } }
see step 5 here https://www.kitura.io/docs/routing/raw-routing
I am running a simple route that fetches data from Redis
Now a simple test
makes the script die with the following errors