Created
December 29, 2011 10:38
-
-
Save eliaskg/1533438 to your computer and use it in GitHub Desktop.
Express.js & Step
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
| var express = require("express"); | |
| var step = require("step"); | |
| var app = express.createServer(); | |
| app.get("/", function(req, res) | |
| { | |
| step( | |
| function one() | |
| { | |
| console.log("one"); | |
| if (true) | |
| return res.send("one"); | |
| this(); | |
| }, | |
| function two() | |
| { | |
| console.log("two"); | |
| res.send("two"); | |
| } | |
| ); | |
| }); | |
| app.listen(8080, function() { | |
| console.log("App is running on port 8080"); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment