Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/follgad/short
simple link shortener
https://github.com/follgad/short
Last synced: 26 days ago
JSON representation
simple link shortener
- Host: GitHub
- URL: https://github.com/follgad/short
- Owner: FOLLGAD
- Created: 2018-02-13T22:31:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-17T15:57:45.000Z (6 months ago)
- Last Synced: 2024-07-17T19:40:19.020Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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