Skip to content

Instantly share code, notes, and snippets.

@DracoBlue
Created August 29, 2010 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DracoBlue/556244 to your computer and use it in GitHub Desktop.
Save DracoBlue/556244 to your computer and use it in GitHub Desktop.
// express_sample.js
// Launched with this command:
// $ EXPRESS_ENV="production" node express_sample.js
var app = require('express').createServer();
app.get('/', function(req, res){
res.send('<h1>Welcome To Testapp</h1>');
});
app.listen(8080);
// fab_sample.js
with ( require( "fab" ) )
( fab )
( listen, 8080 )
( /^\// )
( "<h1>Welcome to TestApp!</h1>" )
( 404 );
// spludo_sample/controllers/main.js
new Controller("", {
"execute": function(params, context) {
return function(cb) {
context.headers["Content-Type"] = "text/html";
cb("<h1>Welcome to Testapp</h1>");
}
}
});
// spludo_sample/run_server.js
require("spludo/core");
new ServerApplication({
port: 8080
}).run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment