seanpmaxwell/overnight

Regex Support in Method Annotations

Closed this issue · 1 comments

The following works in Express:

// Matches /snake
// Matches /ssnake
// Matches /sssnake
app.use(/\/s+nake/, (req, res) => {
    res.send('A slithery snake.')
});

It would be great if this worked with Overnight:

@Get(/s+nake/)
public getSnake(req: Request, res: Response): any {
    return res.status(OK).json({
        message: 'A slithery snake.',
    });
}

Thanks for you support, done!!