Skip to content

Commit

Permalink
Update Readme file 📝
Browse files Browse the repository at this point in the history
  • Loading branch information
alivx committed Dec 8, 2020
1 parent 9d26d42 commit 52bfcc4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# urless
URL Shortener Service
URL Shortener `API` Service

self-hostable open-source URL shortening web API service with a Fast API. It allows you to host your own URL shortenerur less easy to use.


## Quickstart

Urless is written in Python, using Redis as its primary database.( TODO redisgears + mysql)


## Installation
Download the latest version of URLess via this image 'alivx/urless:latest'.
To to container:
```Bash
docker run --rm -ti -p 8000:8000 alivx/urless:latest
```
* install redis-server or use the below docker command:
```Bash
docker run -ti --rm --network host -p 6379:6379 redis:latest
```


To test service run CURL command:
```Bash
curl --location --request POST 'http://127.0.0.1:8000/' \
--header 'Content-Type: application/json' \
--data-raw '{"url":"www.google.com"}'
```
2 changes: 1 addition & 1 deletion api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


app = FastAPI()
rds = redis.Redis()
rds = redis.Redis(host="127.0.0.1")


class Item(BaseModel):
Expand Down

0 comments on commit 52bfcc4

Please sign in to comment.