servie-redirect

Simple redirects for Servie

Usage no npm install needed!

<script type="module">
  import servieRedirect from 'https://cdn.skypack.dev/servie-redirect';
</script>

README

Servie Redirect

NPM version NPM downloads Build status Test coverage

Simple URL redirection for Servie - thin layer for creating a Response with body and status code.

Installation

npm install servie-redirect --save

Usage

import { redirect } from "servie-redirect";

function handle(req) {
  return redirect(req, "/goto");
}

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

Apache 2.0