I'd like to try running nodejs on port 80 on a debian and gentoo server
I've seen a lot post how people do this but I'd like to get some additional 
advice so I don't screw things up on our test servers.
I'm just getting started with node.
I have installed hapi
Thanks, cwc

var Hapi = require('hapi');
var server = new Hapi.Server(80);

server.route({
    method: 'GET',
    path: '/',
    handler: function (request, reply) {
        reply('Hello, world!');
    }
});

server.route({
    method: 'GET',
    path: '/{name}',
    handler: function (request, reply) {
        reply('Hello, ' + encodeURIComponent(request.params.name) + '!');
    }
});

server.start(function () {
    console.log('Server running at:', server.info.uri);
});


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/feeda1ed-67bd-4259-8f9e-cf42e68e7876%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to