Is it possible in express JS to only accept one of two values in a path variable?
Advertisements Let’s say I have this GET url in my REST service: router.get(‘/api/platform/:type’, async (req, res) => { // something } I only want the request if :type is "windows" or "android". are there any way to do this in the url definition? I think I’ve seen something like this before: router.get(‘/api/platform/:type{windows|android}’, async (req, res)… Read More Is it possible in express JS to only accept one of two values in a path variable?