I am trying to use Reg Ex with an Express route in my Node app. I want the route to match the path '/' or '/index.html' but instead it matches EVERYTHING :(
Here's my route.
app.get(/\/(index.html)?/, function(req, res){
res.set('Content-Type', 'text/plain');
res.send('Hello from node!');
});
How can I get this regular expression to work?