public
Last active

  • Download Gist
app.js
JavaScript
1 2 3 4 5
// picard_sample/app.js
require('./config/env')
get('/', function(){
return { text: '<h1>Hello to TestApp!</h1>' }
})
express_sample.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13
// express_sample.js
 
// Launched with this command:
// $ EXPRESS_ENV="production" node express_sample.js
 
require('express')
 
get('/', function(){
this.contentType('html')
return '<h1>Welcome to Testapp</h1>'
})
 
run();
fab_sample.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12
// fab_sample.js
with ( require( "fab" ) )
 
( fab )
 
( listen, 8080 )
 
( /^\// )
 
( "<h1>Welcome to TestApp!</h1>" )
 
( 404 );
main.js
JavaScript
1 2 3 4 5 6 7 8 9
// 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>");
}
}
});
run_server.js
JavaScript
1 2 3 4 5 6
// spludo_sample/run_server.js
require("spludo/core");
 
new ServerApplication({
port: 8080
}).run();

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.