Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Latest commit

 

History

History
89 lines (69 loc) · 3.2 KB

README.md

File metadata and controls

89 lines (69 loc) · 3.2 KB

Roosmarks Build Status

A self-hosted bookmarking service, similar(ish) to delicious, pinboard and probably others.

I'm going to use this project to explore some ideas I've got about how bookmarking services might be more useful to me.

I currently have a version hosted on Heroku at roosmarks.

Using Javascript to retrieve a bookmark

url = 'https://roosmarks.herokuapp.com/bookmarks/'
url = url + encodeURIComponent(document.location.href)
var req = new XMLHttpRequest();
req.onload = function() {
  console.log(this.responseText);
};
req.open('get', url, true)
req.setRequestHeader('Accept', 'application/json')
req.send()

Development

Pre-requisites

Getting started

$ bundle install
$ rake db:create:all
$ rake db:migrate
$ script/rails s # or
$ echo RACK_ENV=development > .env
$ foreman start

Deploying to Heroku

You'll need the Heroku Toolbelt in order to deploy to Heroku.

$ git clone https://github.com/chrisroos/roosmarks.git
$ cd roosmarks
$ heroku apps:create your-chosen-app-name-here
$ heroku config:add ROOSMARKS_USERNAME=your-username-here
$ heroku config:add ROOSMARKS_PASSWORD=your-password-here
$ git push heroku master
$ heroku run rake db:migrate

All being well, you've now got your own copy of Roosmarks running on Heroku. You can visit it at http://your-chosen-app-name-here.herokuapp.com.

FreeBSD specific installation notes

I had to jump through some hoops to get this running on FreeBSD 8.2:

# Set PACKAGESITE to point to FreeBSD 8 stable packages so that we can get postgresql 9.1
# (The latest postgresql package for my FreeBSD 8.2 release is 9.0, which caused me problems)
$ setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/

# Installing libxml2, libxslt, postgresql and node
$ pkg_add -r libxml2
$ pkg_add -r libxslt
$ pkg_add -r postgresql91-server
$ pkg_add -r node

# Installing Sqlite3
# NOTE. The sqlite3 package contains the necessary development headers
# NOTE. You have to pass the --with-sqlite3-dir compile flag to ensure the gem is installed correctly
$ pkg_add -r sqlite3
$ bundle config build.sqlite3 --with-sqlite3-dir=/usr/local/