A simple web API for link shortening
dokcer-compose up
- edit database config in
./configs/database.json
- use
psql -U postgres -f db.sql
for create database - use
go run .
to start app
Endpoint | Method | Params | Description |
---|---|---|---|
/generate |
POST |
long_url: <str> |
Generates a short url |
/:short_url |
GET |
None | Find long url and redirect |