a stupidly simple URL shortener. or lengthener. redirectioner.
to run slimcontroller, you'll need to have a valkey/redis server running somewhere. spinning up a valkey server locally is easy:
docker run -d --name valkey -p 6379:6379 valkey/valkey:latest
note that valkey is not persistent by default, so all shorthands created will be wiped when the server is restarted. it's up to you on how you handle this. more info here
docker build -t slimcontroller .
docker run -p <SERVER_PORT>:<SERVER_PORT> -e REDIS_URL=<REDIS_URL> slimcontroller
cargo build --release
./target/release/slimcontroller <SERVER_PORT> <REDIS_URL>
- the frontend can then be accessed via
localhost:SERVER_PORT
.
any of the following may be supplied as environment variables.
SERVER_PORT
can be anyu16
REDIS_URL
can be a URL (String
) or port (u16
)- if a port alone is provided, it's assumed your server's running locally
- a valid
REDIS_URL
might be127.0.0.1:6379
if you ran the above command
you should specify an --admin-password
. see authentication for more information.
i recommend following the above docker instructions. don't forget to set the --server-hostname
(may be an environment variable SERVER_HOSTNAME
).
if you'd like, you can make individual set/delete operations require a password. just pass in the --password <PASSWORD>
flag.
you should provide an --admin-password
when running slimcontroller. if you don't provide one, your admin password will be the same as your --password
. if you provide neither, you will not be able to access the /admin
panel at all.
so long as you have an admin password of some variety, you can access the /admin
panel.