Node.js express handle parameter
var express = require('express'); var app = express(); app.get('/', function (req, res) { res.setHeader('Content-Type', 'text/plain'); res.end('Hello, world!'); });/*from ww w.j a va 2s. c o m*/ app.get('/:name', function(req, res){ var name = req.params.name; res.send('Hello, ' + name); }); app.listen(1337); console.log('Listening on port 1337');