Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alexanderprendota/aws-url-shortener

:scissors: URL Shortener. Use Amazon Web Services
https://github.com/alexanderprendota/aws-url-shortener

aws shortener url-shortener

Last synced: 5 days ago
JSON representation

:scissors: URL Shortener. Use Amazon Web Services

Awesome Lists containing this project

README

        

[![Version](https://img.shields.io/badge/version-v0.0.1-green.svg)](https://github.com/AlexanderPrendota/aws-url-shortener/releases)

# URL Shortener

Сurrent version: 0.0.1 :tada:

### Environment:

| ENV | Description |
| -------------------|-----------------------------------------|
| AWS_KEY | AWS Credential |
| AWS_SECRET | AWS Credential |
| REDIRECT_HOST_NAME | Static web-site host name from S3 bucket|
| BUCKET_NAME | Amazon S3 bucket name |

### Example

screen shot 2018-08-22 at 5 12 35 pm

# How to use

From `Java-Script`:

```js
const URL = 'URL_TO_SHORTNER';

function generateShortUrl(longUrl) {
return fetch(URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: longUrl })
}).then(data => data.json());
}

```