This is the code for bm.suram.in. I use this to bookmark websites with custom redirect URLs.
The application is written in Go and uses editable grid to list/search/update the bookmarked URLs. The app uses sqlite (the poor man's DB!) to persist data.
Use internal/testdata/test_db
to get an empty sqlite file with the correct schema. Schema is as follows.
CREATE TABLE "aliases" (
`orig` TEXT,
`alias` TEXT UNIQUE,
`rec_id` INTEGER PRIMARY KEY AUTOINCREMENT
);
CREATE INDEX aliases_orig_index ON "aliases" (orig);
CREATE TABLE `config` (
`key` TEXT,
`value` TEXT,
PRIMARY KEY(key)
)
The application has 2 "admin" features. To enable these features there needs to be a record with key set to bm_secret
and value set to {YOUR_SECRET_KEY}
in the config
table.
- After this, content can be modified only if the correct secret is passed in the request.
- Any bookmark with alias that starts with
_
will be hidden unless the secret is passed in the request.
Clone the repository to $GOPATH/src/github.com/dotslash/bookmarks and the following to start the server.
go build
./bookmarks http://localhost:8085 8085 foo.db
The logs will go to ~/log/bm-info.log
, ~/log/bm-error.log
Check scripts/supervisor_aws.conf
to see how I install the server.
The application also comes with a compatible chrome extension. Check out its Readme