Lnk is a basic url shortener that can be managed via rest api calls
all tasks are managed via mage, to install it simply run
go install github.com/magefile/mage@latest
then on the root of the project, where the magefile.go
file is located, you can
run mage
to discover all the available tasks and their description
if mage is not available, or you don't want to install third party dependencies, you can use go run to spin up the server
go run .
no deployment strategy is provided at the moment
the lnk api is built with grpc with a rest layer on top of it thanks to grpc-gateway
for the rest api, once the service is running just visit localhost:8000/api/docs
and browse the openapi schema
the grpc server is running on the port 9000, and has reflection enabled using a client like evans you can open a repl where all rpc calls should be available
evans repl -r --host localhost --port 9000
the only database implemented currently is in-memory; this database is only intended for local development and testing, and it's not recommended for any serious use case
the database is feature complete, but it's process local, so horizontally scaling this service is not possible, as each process will have its own database