Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marsprince/nest-tinyurl


https://github.com/marsprince/nest-tinyurl

nestjs typeorm typescript

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

## Description
This's a tinyUrl module for [Nest](https://github.com/nestjs/nest) to generate short url.

## Installation

```bash
$ npm install nest-tinyurl
```

## Quick Start

### Include entity
```typescript
export { TinyUrl } from 'nest-tinyurl';
```

### Include module
```typescript
import { TinyUrlModule } from 'nest-tinyurl';
```

### Use service
```typescript
import { TinyUrlService } from 'nest-tinyurl';
```

generate
```typescript
TinyUrlService.generateShortUrl(url)
```

get
```typescript
TinyUrlService.getUrlByShortUrl(url)
```