Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sidraval/swift.on.snap
Swift on Snap
https://github.com/sidraval/swift.on.snap
Last synced: 13 days ago
JSON representation
Swift on Snap
- Host: GitHub
- URL: https://github.com/sidraval/swift.on.snap
- Owner: sidraval
- Created: 2015-01-29T23:32:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-19T22:41:49.000Z (over 9 years ago)
- Last Synced: 2024-10-11T23:42:32.506Z (about 1 month ago)
- Language: Swift
- Size: 433 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#![Swift](https://raw.githubusercontent.com/sidraval/swift.on.snap/master/backend/assets/swift-logo.png)![Snap](https://raw.githubusercontent.com/sidraval/swift.on.snap/master/backend/assets/snap-logo-small.png)
An attempt to build a Swift powered iOS application backed by a RESTful [Snap](http://www.snapframework.com) backend.## Building the backend
```bash
$ git clone https://www.github.com/sidraval/swift.on.snap.git
$ cd swift.on.snap/backend
$ cabal sandbox init
$ cabal install snap
$ cabal install
$ backend -p 9000
```## To do
* Each service has its own `pg` snaplet embedded in it. Extract this.
* `withAuthorizedUser` should have type signature `Handler b v (Maybe User)` for generality.
* Can't add restriction `(HasPostgres (Handler b v))` unfortunately...?
* Proper JSON parsing in Swift, rather than `Dictionary`
* Snap should return proper JSON (i.e. not every value should be a string), so we don't have to cast in Swift.
* Use preprocessor macros for URLs instead of hardcoding