"onepixel" is an API-first URL shortner.
A URL shortner should have a short domain name, possibly 2 or 3 letter in length.
"1 pixel" is the smallest unit of a screen.
So 1px.li
stands for one pixel links
- i.e. smallest possible links :)
The latest version of the code is automatically deployed via Railway
to
https://onepixel.link
You can deploy your own instance too
Simplest way to get it running is
- make a
./data
directory where your database will be stored - run
docker-compose up
We will use docker to run an instance of database, but we will run the project using air locally
- make a
./data
directory where your database will be stored - run
docker-compose up -d postgres
- add
127.0.0.1 postgres
to your/etc/hosts
file 1 - run
air
in the root directory of the project 2
Note[1] This is because the server is configured to connect to
host=postgres
for the database.
Note[2]: you can also run
go run src/main.go
but it will not reload on changes