https://github.com/serviejs/servie-redirect
Redirects for Servie
https://github.com/serviejs/servie-redirect
301 302 redirects servie typescript
Last synced: 4 months ago
JSON representation
Redirects for Servie
- Host: GitHub
- URL: https://github.com/serviejs/servie-redirect
- Owner: serviejs
- License: other
- Created: 2017-02-05T03:22:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:32:00.000Z (over 1 year ago)
- Last Synced: 2025-01-28T06:47:11.518Z (5 months ago)
- Topics: 301, 302, redirects, servie, typescript
- Language: TypeScript
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Servie Redirect
[](https://npmjs.org/package/servie-redirect)
[](https://npmjs.org/package/servie-redirect)
[](https://travis-ci.org/serviejs/servie-redirect)
[](https://coveralls.io/r/serviejs/servie-redirect?branch=master)> Simple URL redirection for Servie - thin layer for creating a `Response` with body and status code.
## Installation
```
npm install servie-redirect --save
```## Usage
```ts
import { redirect } from "servie-redirect";function handle(req) {
return redirect(req, "/goto");
}
```## TypeScript
This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.
## License
Apache 2.0