Titan
Titan copied to clipboard
The small & modular microframework for server-side Swift 3
```swift titan.get("/index") { ... } titan.predicate(isAuthenticated, true: { titan.get("/user") { ... } }, false: { titan.addFunction { "Not Authorised" } }) ``` A request to `/index` will set the response...
Quoth the Ryan: >Add better handling for queryPairs and Headers into dictionaries (as opposed to arrays of touples) so that we don't always have to constantly iterate over them to...
The current user story is "use predicates and all of their pitfalls". Quoth the Ryan: > A better versioning system for routes vs the current predicate method. There has to...
``` import Titan let titanInstance = Titan.sensible() // 404 and healthchecks as standard titanInstance.healthCheck = HealthzWithCheck { //... } let version3Routes = VersionedRoutes(version: 3, routes: [functToSetARoute, funcToSetSecondRoute]) let version2Routes =...
>If the API versioning is robust enough, we can probably do things like require a healthz route in the declaration of API routes as part of a protocol or required...
Quoth the Ryan: > A TitanPerfectAdapter. Perfect is very, very fast. Like way faster than Kitura. Not Go fast, but faster. And the official Apple team implementation is far away...
Quoth the Ryan: >Get fancy with the 404 handling and override 404's that match versioned routes that aren't passed the proper version in the version header to automatically send an...
Quoth the Ryan: > Add 404 handling automatically, I don't see a case where we don't want 404 responses on unrecognized routes, so with a better route versioning system, this...
The design document needs some love. Some things need to be deleted, moved around and rethought, too.