Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get( '/test/:id([0-9]+)?', ( req, res ) => {
- res.send(`ID: ${req.params.id}`);
- } );
- app.get( '/test/:name([a-zA-Z]+)?', ( req, res ) => {
- res.send(`NAME: ${req.params.name}`);
- } );
Advertisement
Add Comment
Please, Sign In to add comment