Skip to content

Commit 69da5c0

Browse files
committed
adding default route configuration example
1 parent 8aaedce commit 69da5c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

demos/basic.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ gateway({
2323
secret: 'shhhhhhared-secret'
2424
})
2525
]
26+
}, {
27+
// this route definition makes /public a default service if prefix is omitted
28+
prefix: '/*',
29+
pathRegex: '',
30+
target: 'http://localhost:3000'
2631
}]
2732
}).start(PORT).then(server => {
2833
console.log(`API Gateway listening on ${PORT} port!`)

0 commit comments

Comments
 (0)