Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serviejs/servie-redirect
Redirects for Servie
https://github.com/serviejs/servie-redirect
301 302 redirects servie typescript
Last synced: 5 days 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:32:00.000Z (about 1 year ago)
- Last Synced: 2024-12-22T17:06:57.517Z (11 days 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
[![NPM version](https://img.shields.io/npm/v/servie-redirect.svg?style=flat)](https://npmjs.org/package/servie-redirect)
[![NPM downloads](https://img.shields.io/npm/dm/servie-redirect.svg?style=flat)](https://npmjs.org/package/servie-redirect)
[![Build status](https://img.shields.io/travis/serviejs/servie-redirect.svg?style=flat)](https://travis-ci.org/serviejs/servie-redirect)
[![Test coverage](https://img.shields.io/coveralls/serviejs/servie-redirect.svg?style=flat)](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