Changelog History
-
v0.7.6 Changes
April 21, 2017Minor adjustments, the main feature being a demo of a typesafe-select in
mods_baredemo.dbd.select("SELECT \* FROM pets") { (name : String, count : Int?) in req.puts("\<tr\>\<td\>\(name)\</td\>\<td\>\(count)\</td\>\</tr\>") }
No manual mapping required, the required static Swift types are the closure types.
-
v0.7.5 Changes
February 14, 2017As part of mod_swift we have been shipping mods_todomvc. Which is an implementation of a Todo-Backend, a simple JSON API to access and modify a list of todos. This release takes Todo-Backend one step further: Access the todos using CalDAV!
That's it. Demos how to implement a basic CalDAV/CardDAV server using Swift.
-
v0.7.0 Changes
February 06, 2017We prefer the Elephant, a lot. It is the right thing.
๐ mod_swift 0.7.0 brings you support for accessing SQL database using Apache mod_dbd. Yes, Apache even includes SQL database support!
Enough words, this is how the code looks like:
guard let con = req.dbdAcquire() else { return ... }guard let res = con.select("SELECT \* FROM pets") else { return ... }while let row = res.next() { req.puts("\<li\>\(row[0])\</li\>") }
And the config looks like so:
<IfModule dbd_module> DBDriver sqlite3 DBDParams "/var/data/testdb.sqlite3" </IfModule>
๐ The release contains a very simple/basic wrapper library to make access to mod_dbd nicer, but is far from being a complete solution. Stay tuned.
-
v0.6.0 Changes
February 05, 2017This release brings support for using mod_swift on Ubuntu (presumably any Linux) and with Apache 2.4 servers installed via Homebrew.
๐ Get ready to deploy!!!
-
v0.5.0 Changes
January 29, 2017โ Adds a simplistic Todo-MVC todo-backend.
-
v0.4.0 Changes
January 29, 2017Modularized the codebase. Instead of having one big project, there are now multiple. This provides both, a raw Apache API for those who want very little, and a Noze.io based Express framework which provides Node.js like convenience.
-
v0.3.0 Changes
January 27, 2017This:
let app = express(cookieParser(), session()) app.get("/express/cookies") { req, res, \_ in// returns all cookies as JSONtry res.json(req.cookies) } app.get("/express/") { req, res, \_ inlet tagline = arc4random\_uniform(UInt32(taglines.count)) let values : [String : Any] = ["tagline": taglines[Int(tagline)], "viewCount": req.session["viewCount"] ?? 0, "cowOfTheDay" : cows.vaca() ] try res.render("index", values) }
and more.
Also:
leftpad
. -
v0.2.0 Changes
January 26, 2017โ Integrated a tiny subset of Noze.io. This makes writing simple handlers, well simple:
apache.onRequest { req, res in res.writeHead(200, ["Content-Type": "text/html"]) try res.end("\<h1\>Hello World\</h1\>") }
-
v0.1.0 Changes
January 26, 2017๐ First release of our
mod_swift
demo. Have fun!