URL shortener written in 30 mins
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
Alfred 89d50a8e6d Add OVERRIDE_DB_PATH and OVERRIDE_REFERRER 5 місяці тому
Dockerfile First commit 5 місяці тому
README.md Add OVERRIDE_DB_PATH and OVERRIDE_REFERRER 5 місяці тому
go.mod First commit 5 місяці тому
go.sum First commit 5 місяці тому
shortener.go Add OVERRIDE_DB_PATH and OVERRIDE_REFERRER 5 місяці тому

README.md

The castizo shortener

The castizo shortener is a url shortener hosted in eñ.xyz. However, you can host it wherever you want because you have the source code just here.

You can run once you have created the path /srv/data. There the shortener will put its database. To run it, with a Go cli:

go run shortener.go

Also you can use Docker to build it:

docker build -t shortener .

And to run it:

docker run -p 6660:6660 shortener

It was done in 30 mins, so do not judge its results…

Note: The shortener accepts to change the domain in which it will publish the urls and the data base path using OVERRIDE_DB_PATH and OVERRIDE_REFERRER environment variables.