Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/404-geek/url-shortner
https://github.com/404-geek/url-shortner
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/404-geek/url-shortner
- Owner: 404-geek
- Created: 2020-07-03T11:03:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T16:15:45.000Z (over 4 years ago)
- Last Synced: 2024-03-15T04:54:12.688Z (10 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL-Shortening API Service (Simple)
## Prerequisites
- Install Redis server ([Redis Installation in Linux](https://redis.io/topics/quickstart))
## Setup
- Create a Virtual Environment `virtualenv -p python3 venv`
- Install the requirements `pip install -r requirements.txt`
- Run the app with `python shorten.py`## Services
- [Shorten the URLs](http://127.0.0.1:5000/shorten) [POST]
> `url` is to be provided in the form-data
- [Stats Info](http://127.0.0.1:5000/info/) [POST] [GET]
>`url id` is to be appended in the url## Run in Production
- Install Docker Engine ([Docker Installation in Debian](https://docs.docker.com/engine/install/debian/))
- Build Docker image of the app `docker build -t urlservice .` in the project directory.
- Run the application `docker run -d -p 5000:5000 urlservice`
## Features that can be included- Web Platform for these APIs.
- URL privacy can be implemented by saving user data and specific origins.
- More stats can be populated for tracking.
- Open API specs to generate stubs.