-
Notifications
You must be signed in to change notification settings - Fork 39
Server
Elliott Minns edited this page Mar 1, 2016
·
3 revisions
Creating the Server is as simple as in the Hello World example.
// Creates an instance of the server
let app = BlackfishApp()
app.get("/") { request, response in
response.send(text: "Hello world")
}
// Starts the server on port 3000
app.listen(port: 3000) { error in
print(error ?? "App listening on port \(app.port)"
}
The API for the server sets different functionality for the below: