ref: 43023ba5f375d51ca8fa98386286b2b29cfb1115 gobin/README.md -rw-r--r-- 1.0 KiB
43023ba5 — Alexey Yerin refactor: go fmt 1 year, 5 months ago


Simple text pasting service similar to pastebin



Two basic requirements are Go compiler and PostgreSQL running. As soon as PostgreSQL is running, set DATABASE_URI to postgresql://-URI:

export DATABASE_URI=posgtresql://user:password@localhost/db


If you want to change port on which application is running, set PORT environment variable (4000 is default).

If your application is hosted not on localhost, you should change BASE_URL environment variable to http:// or https:// + your domain (e.g. https://somesite.dev)

export BASE_URL=https://somesite.dev
export PORT=80


git clone https://git.sr.ht/~yerinalexey/gobin
cd gobin

go build


./gobin-migrate up

If something goes wrong, you can apply migrations manually by running up.sql files in subdirectories of ./migrations.



It's a good idea to run gobin binary as a system service. Make sure to provide all environment variables.