`//When a user submits a form, create a new page
app.post('/submit', urlencodedParser, function(req, res){
var nom = req.body.nom;
/ save nom to database /
res.redirect('http://myDomain/' + nom);
});
app.get('/:nom', function(req, res){
/ if nom exists in database -> return ejs template with vars /
/ else return 404 /
});`
Something like
`//When a user submits a form, create a new page app.post('/submit', urlencodedParser, function(req, res){
var nom = req.body.nom; / save nom to database / res.redirect('http://myDomain/' + nom); });
app.get('/:nom', function(req, res){ / if nom exists in database -> return ejs template with vars / / else return 404 / });`