1
0
hugo/content/blog/2016-08-01-swift-swiftra.md
2024-04-23 22:21:26 +09:00

607 B

+++ date = "2016-08-01" tags = ["memo"] title = "swift-swiftra" slug = "swift-swiftra" +++

swiftraというものがあります。名前からも分かるようにsinatraをリスペクトして作成されているぽい。

$ git clone https://github.com/takebayashi/swiftra-example.git
$ cd swiftra-example
$ swift build
$ ./.build/debug/swiftra-example
$ curl 'http://localhost:8080/abc'
/abc was requested with GET
$ curl -X POST -d foo=bar 'http://localhost:8080/abc'
/abc was requested with POST, body = foo=bar