Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/follgad/short

simple link shortener
https://github.com/follgad/short

Last synced: 26 days ago
JSON representation

simple link shortener

Awesome Lists containing this project

README

        

# Short

Shortens links.

# Run

1. Create a .env, alternatively remove ".example" from `.env.example`

2. `npm install`

3. `npm start`

# API

## Get

```
GET /
```

Returns all shortened links

```
GET /:id
```

Redirects you to the real url of the shortened link

## Post

```
POST /
password: pw123
Content-Type: application/json

{
"url": "https://github.com/follgad"
}
```

```
201 Created
Content-Type: application/json

{
"url": "https://github.com/follgad",
"createdAt": "2018-02-13T22:08:52.158Z",
"visits": 0,
"_id": "3d0gFbw8"
}
```

## Delete

```
DELETE /:id
password: pw123
```

```
204 No Content
```

Deletes the link at the specific ID