A security-focused, experimental web framework.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources/Sound
Tests
.gitignore
LICENSE
Package.resolved
Package.swift
README.md

README.md

Sound

Sound is a work-in-progress, experimental web framework written with Swift and Swift-NIO. The goal of this project is to define some best practices for writing secure web frameworks and to present a working demonstration of these practices.

Configuration

Using Swift Package Manager, add Sound to your dependencies:

let package = Package(
    name: "project_name",
    dependencies: [
       .package(url: "git@github.com:SoundFramework/Sound.git", .branch("master")),
    ],
    targets: [
        .target(
            name: "project_name",
            dependencies: ["Sound"]),
    ]
)

Hello, world!

import Sound

let app = Sound()

app.get("/") { conn, _ in
    conn.text("Hello, world!")
}
app.get("/hello/#name") { conn, params in
    let name = params["name"]!
    conn.text("Hello, \(name)!")
}

app.listen()

Then run with: $ swift run