Skip to content

Commit 1baeaae

Browse files
committed
New catch all syntax for Express 5
1 parent 2eda579 commit 1baeaae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ app.use(function(req, res, next){
5858
next();
5959
}));
6060
});
61-
//Handle all paths
62-
app.all('*', (req, res) => {
61+
//Handle all paths. This /{*splat} is new Express 5 path syntax. https://expressjs.com/en/guide/migrating-5.html#path-syntax
62+
app.all('/{*splat}', (req, res) => {
6363

6464
if(process.env.OVERRIDE_RESPONSE_BODY_FILE_PATH){
6565
// Path is relative to current directory

0 commit comments

Comments
 (0)