You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to both Swift coding and Taylor, been trying to get the example program to run and I keep getting:
server.swift:6:2: error: contextual type for closure argument list expects 3 arguments, but 2 were specified
req, res in
with my code being:
import Taylor
let server = Taylor.Server()
server.get("/") {
req, res in
res.bodyString = "Hello, world!"
return .Send
}
let port = 3000
do {
print("Starting server on port: \(port)")
try server.serveHTTP(port: port, forever: true)
} catch {
print("Server start failed \(error)")
}
Just wondering what I'm doing wrong here, I can't work out what any missing parameter would be from reading the Taylor source code right now.
The text was updated successfully, but these errors were encountered:
Ah - sorry for the confusion. We haven't had the chance to tag a release for the new usage, but already updated the README. You have two options:
Update your version of Taylor by adding either "master" to the end of the line of your Cartfile, or adding :branch => "master" in your Podfile, depending on which one you're using.
I'm new to both Swift coding and Taylor, been trying to get the example program to run and I keep getting:
with my code being:
Just wondering what I'm doing wrong here, I can't work out what any missing parameter would be from reading the Taylor source code right now.
The text was updated successfully, but these errors were encountered: