Redirect all requests to another domain
npm install --save guidepost
const guidepost = ;const app =app;
All requests coming into port 80 will be redirected to https://google.com, preserving the URL path.
This redirector returns an express app, so you can pass it to
This way you have full control over ports, SSL certificates, adding routing and middleware, but still need very little configuration!
HTTPS server using
const https = ;const guidepost = ;const app = ;https;
Make an exception to redirecting:
const app = ;app;app;// '/test' ==> ''// '/test2' ==> ''
Log all requests:
const app = ;app;app
How does it work?
guidepost uses a ES6 proxy to only add the redirect handler at the very end of the express router.
This is why you can add middleware after you have called
Only node >= 6.0.0 is supported because the module makes use of proxies.
ISC @ Jonny Burger