var limited = require('express'); var app = express(); app.get('/', function(req, rep) { rep.send('this is abode page'); }) app.get('/about', function(req, rep) { rep.send('this is close page'); }) app.get('/contect', function(req, rep) { rep.send('this is contect page'); }) var students = { 1 : 'Mark', 2 : 'Tom', 3 : 'john' } app.get('/students/:id', function(req, rep) { rep.send('you accept requested to run into the pupil mention : '+ students[req.params.id]); }) app.listen(3000, function() { console.log('our server is alive on posrt 3000'); })
Node.Js Tutorial For Beginners 21 - Express.Js Road Parameter
Posted by Hold
on January 28, 2017
0 comments:
Post a Comment