Open jhoughjr opened 8 years ago
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.
let server = Taylor.Server()
server.get("/") {
req, res, cb in
res.bodyString = "Hello, world!"
cb(.Send(req, res))
}
let port = 3002
do {
print("Staring server on port: \(port)")
try server.serveHTTP(port: port, forever: true)
} catch let e {
print("Server start failed \(e)")
}
I thought I had responded to this earlier, thanks for the assistance. I look forward to this project growing!
Thanks @Danappelxx
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?