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
The Hello, World example isn't working at all for me.
my code in app delegate, pasted from the docs:
`import Cocoa
import Taylor
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow!
func applicationDidFinishLaunching(aNotification: NSNotification) {
let server = Taylor.Server()
server.get("/") { req, res in
res.bodyString = "Hello, world!"
return .Send
}
let port = 3002
do {
print("Starting server on port: \(port)")
try server.serveHTTP(port: port, forever: true)
} catch {
print("Server start failed \(error)")
}
}
`
The error is : Contextual type for closure argument list expects 3 arguments, but 2 were specified.
I've tried for quite a while to get the format of the closure correct but to no avail. where can I find a working example so I can start using this?
The text was updated successfully, but these errors were encountered:
Hey there! It seems as though you're using the latest release instead of the master branch. Unfortunately development stalled in the middle of a large refactor, so although we updated the readme we didn't tag a new release. For now you can use the example in the readme from the previous release here.
letserver=Taylor.Server()
server.get("/"){
req, res, cb in
res.bodyString ="Hello, world!"cb(.Send(req, res))}letport=3002do{print("Staring server on port: \(port)")try server.serveHTTP(port: port, forever:true)}catchlet e{print("Server start failed \(e)")}
The Hello, World example isn't working at all for me.
my code in app delegate, pasted from the docs:
`import Cocoa
import Taylor
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
`
The error is : Contextual type for closure argument list expects 3 arguments, but 2 were specified.
I've tried for quite a while to get the format of the closure correct but to no avail. where can I find a working example so I can start using this?
The text was updated successfully, but these errors were encountered: