https://github.com/follgad/short
simple link shortener
https://github.com/follgad/short
Last synced: about 1 year ago
JSON representation
simple link shortener
- Host: GitHub
- URL: https://github.com/follgad/short
- Owner: FOLLGAD
- Created: 2018-02-13T22:31:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-17T15:57:45.000Z (almost 2 years ago)
- Last Synced: 2025-02-07T03:15:19.092Z (over 1 year 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