-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"}' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
|
||
app = FastAPI() | ||
rds = redis.Redis() | ||
rds = redis.Redis(host="127.0.0.1") | ||
|
||
|
||
class Item(BaseModel): | ||
|