How To Show Username In Url After Post Form In Express?
Im using Express framework and mysql database. i want to show database username in url like 'localhost:1001/Home/Jay' After post login form. i tried in GET method but in get method
Solution 1:
You have to make the URL path dynamic:
app.get('/Home/:id', function(req, res){
// render your dynamic template hereconsole.log(req.params.id)
});
Thus rendering: "localhost:1001/Home/Jay" More documentation can be viewed here on more routing examples: expressJs routing
Post a Comment for "How To Show Username In Url After Post Form In Express?"