jcubic / wayne

Service Worker Routing library for in browser HTTP requests
https://jcubic.github.io/wayne
MIT License
556 stars 29 forks source link

Add redirects #2

Closed jcubic closed 2 years ago

jcubic commented 2 years ago

In orinal article code there is:

resolve(Response.redirect(url + '/', 301));

The library should be able to do that.

Possible API:

app.get('/something', (req, res) => {
  res.redirect(`${req.url}/`, 301);
});

TODO: