https://github.com/nakov/shorturl
URL Shortener (JS App)
https://github.com/nakov/shorturl
Last synced: 9 months ago
JSON representation
URL Shortener (JS App)
- Host: GitHub
- URL: https://github.com/nakov/shorturl
- Owner: nakov
- Created: 2021-02-17T23:24:44.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-22T08:52:43.000Z (over 3 years ago)
- Last Synced: 2025-04-05T05:51:12.078Z (9 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Short URL JS App + RESTful API
The JS app "Short URL" holds a collection of URLs, accessible with a short code:
- Add a new URL -> generates a short URL
- Redirect by short URL to the original URL
- Statistics: URL | Short URL | Date Created | Visits
## App Details
The app is based on Node.js + Express.js + Pug.
- It has **no database** and app data is not persistent!
Demo:
- Web app live demo: https://shorturl.nakov.repl.co
- RESTful API live demo: https://shorturl.nakov.repl.co/api
- Play with the code at: https://repl.it/@nakov/shorturl
## RESTful API
The following endpoints are supported:
- `GET /api` - list all API endpoints
- `GET /api/urls` - list all shout URLs
- `GET /api/urls/:shortCode` - finds short URL by given `shortCode`
- `POST /api/urls` - create a new URL shortcode (post a JSON objects in the request body, e.g. `{"url":"https://cnn.com", "shortCode":"cnn"}`
- `DELETE /api/urls/:shortCode` - deletes short URL by given `shortCode`
- `POST /api/urls/visit/:shortCode` - visits short URL by given `shortCode` (increases the visits count)
## Windows Desktop Client App
https://github.com/nakov/ShortURL-DesktopClient
## Screenshots



