golinks for your personal setup
- Create, edit, delete golinks
- Web client to manage your golinks
- Go
- Rust
- trunk
- Clone this repo
- Run
make
in the root of the repo to build and install thegolinks
binary
Usage:
$ golinks -h
Usage of golinks:
-db string
path to database file (default "golinks.sqlite")
-port int
port to run server on (default 7890)
To bind the server at localhost:80
and create the database file in your home directory, run:
golinks -port 80 -db ~/golinks.sqlite
You should see the web client at localhost/links.
Add this line to /etc/hosts
:
127.0.0.1 go # this can be any name you want
You should be able to see the web client at go/links.
NOTE: You may need to restart the mDNS daemon process (on macOS):
sudo killall -HUP mDNSResponder
To start golinks
on login:
On macOS:
-
Open the "Automator" app.
-
Create a new "Application".
-
Select the "Run Shell Script" action.
-
Enter this script:
~/go/bin/golinks -port 80 -db ~/golinks.sqlite &>/dev/null &
NOTE:
&>/dev/null &
will terminate the Automator application while leaving thegolinks
process running in the background (so you don't get an extra icon in your menu bar). -
Save the app.
-
Open System Settings, click on "General", and then click on "Login Items". Click the "+" button and choose the Automator app you created.
Alternatively, you can also create a launchd agent.
The (perhaps very over-engineered) client is a WebAssembly application created using yew and Rust. It is styled using Milligram with the help of Stylist and is built using trunk.
The client and API are served by a backend implemented using Gin and Go. The database is handled using GORM and SQLite.