sus/readme.md

48 lines
902 B
Markdown
Raw Normal View History

2022-05-26 15:14:24 +00:00
# sus
2022-05-26 01:08:50 +00:00
simple URL shortener
2022-05-26 14:51:14 +00:00
2022-05-26 15:14:24 +00:00
## usage
2022-05-26 14:51:14 +00:00
2022-05-26 15:14:24 +00:00
- creating a new shortlink at https://pls.cx/shortlink
2022-05-26 15:03:38 +00:00
susmng [-s pls.cx] create -l shortlink -v https://example.com
2022-05-26 15:14:24 +00:00
- deleting the shortlink https://pls.cx/shortlink
2022-05-26 15:03:38 +00:00
susmng [-s pls.cx] delete -l shortlink -v confirm
susmng will assume the first server in the 'secrets' section if the -s flag is
not provided.
2022-05-26 15:14:24 +00:00
## installation
2022-05-26 15:03:38 +00:00
2022-05-26 15:14:24 +00:00
### running the server
2022-05-26 14:51:14 +00:00
1. generate the secret used to create and delete shortlinks
echo SECRET=`pwgen -s 64 1` >> .env
2. run the services
docker-compose up -d --build
2022-05-26 15:14:24 +00:00
#### server environment variables
- `SECRET` - the secret used for signature verification
- `LISTEN_ADDRESS` - the address the server is listening on (default is `0.0.0.0:80`)
### setting up susmng
2022-05-26 14:51:14 +00:00
1. install susmng
make install-susmng
2. create config files
susmng init
3. edit config files (~/.config/susmng/config.json) to add your secrets