Skip to content
Elliott Minns edited this page Mar 1, 2016 · 3 revisions

Server

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:

Roadmap

Guide

Clone this wiki locally