Created
January 28, 2009 21:12
-
-
Save greut/54188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/bin/roundup b/bin/roundup | |
| index 5605e36..d131a79 100755 | |
| --- a/bin/roundup | |
| +++ b/bin/roundup | |
| @@ -5,13 +5,13 @@ load("core.js"); | |
| require("lib/roundabout"); | |
| require("lib/jack/lobster"); | |
| -Roundabout.GET("/", function() { | |
| +Roundabout.application.GET("/", function() { | |
| return "hello world!"; | |
| }); | |
| -Roundabout.GET("/asdf", new Jack.Lobster("asdf")); | |
| +Roundabout.application.GET("/asdf", new Jack.Lobster("asdf")); | |
| -Roundabout.route({ | |
| +Roundabout.application.route({ | |
| path: "/hello/*", | |
| GET: function() { | |
| this.redirect("http://"+this.wildcards[0]); | |
| @@ -24,7 +24,7 @@ Roundabout.route({ | |
| } | |
| }); | |
| -Roundabout.GET("/*/{asdf}", function() { | |
| +Roundabout.application.GET("/*/{asdf}", function() { | |
| //this.response.write("Hello " + this.wildcards[0] + " and " + this.wildcards["asdf"] + "\n"); | |
| var gets = this.request.GET(); | |
| for (var i in gets) { | |
| @@ -32,7 +32,7 @@ Roundabout.GET("/*/{asdf}", function() { | |
| } | |
| }); | |
| -Roundabout.GET("/hello", function(env) { | |
| +Roundabout.application.GET("/hello", function(env) { | |
| var req = new Jack.Request(env); | |
| var name = req.GET()["name"]; | |
| @@ -42,7 +42,7 @@ Roundabout.GET("/hello", function(env) { | |
| return resp.finish(); // equivalent to returning [200, {"Content-Type" : "text/plain"}, "hello "+name+"!"] | |
| }); | |
| -Roundabout.GET("/hello1", function() { | |
| +Roundabout.application.GET("/hello1", function() { | |
| var name = this.request.GET()["name"]; | |
| this.header("Content-Type", "text/plain"); | |
| this.body("hello "+name+"!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment