I'm looking to add an optional parameter to an express route where var1 has to be set but var 2 can be ommited (/test/0 and /test/0/0 should both work).
I could create another rule, or juste evaluate the string "test/0/0" but I'm wondering if there is no other way.
app.get('/test/:var1/:var2', function(req, res){
// DO SOMETHING
});
Thanks !