New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sinatra #27
Comments
hi @jchannon I've not seen it yet. I've just had a quick look at it looks like a nice source of:
I will take my time on this. best |
I contribute to a C# framework - http://nancyfx.org which is inspired from Sinatra Would be good to see a Swift inspired fwk too 😄 |
@jchannon wow, I really like this:
|
Lets do it! 😄 |
+1 |
You could do it somewhat like this:
|
Of course you could also do it like Nancy:
|
Nice!! On Thursday, 25 June 2015, Jayson Rhynas notifications@github.com wrote:
|
@glock45 consider Laravel or RoR? |
Hi...are u still following the idea to make a Sinatra inspired swift version ?! When apple finally releases Swift for linux then "swifter" would be perfect for creating micro services |
+1 |
@mwelser and @tristaaan Swifter will not work on Linux even after Swift is open sourced and ported because it depends on Foundation, which Apple will not port to Linux or open source. |
Basic support for Sinatra routing has been added recently: df24ced |
hi guys ( @jchannon @sdgandhi @tristaaan @mwelser @18601673727 @jchannon @jayrhynas @julien-c and others ! ) This thread is the main place for discussing routing mechanism so let me summarise what we already have an what's the bright future :) With version 1.0.5 we have a support for the following routing mechanism: Example 1 ( new ):
Example 2 ( old - still supported ):
We also extracted IO part from HttpServer class to HttpServerIO class:
As you can see the only task for HttpServer class is to expose the routing API and perform the routing. It means everybody can now create a new cool routing DSLs and add is as another MyHttpServer or make an extension for current HttpServer without making huge changes in HttpServer class:
or
Below I got examples of the new ideas I've been thinking about:
or
|
Is it possible to use wildcard/regexp in routes? Thanks and Happy Holidays! |
hi @BeQ Initially we supported regexps but we removed it :) Wildcard is supported. Please have a look at the example: https://github.com/glock45/swifter/blob/master/Sources/DemoServer.swift#L104 best |
Are you planning to or know of any efforts to create a Swift framework inspired by Ruby's Sinatra?
I see this has some similarities but wondered if you planned to take it further?
The text was updated successfully, but these errors were encountered: