GitHub star management, on web.
- Install
node
npm install -g bower gulp
npm install
andbower install
gulp
First, set these env vars.
export STARGAZER_CLIENT_ID={github_client_id}
export STARGAZER_CLIENT_SECRET={github_client_secret}
export STARGAZER_COOKIE_SECRET={cookie_salt}
export COUCHDB_ADMIN_PASSWORD={couchdb_admin_password}
- Setup front-end first
- Install and startup CouchDB, and setup an admin with name starwarden, use the password in env vars.
- Install redis
- Install rvm and use rvm’s ruby
bundle
- Setup meta db with
ruby bootstrap.rb
- cd into the
redis
subdir andredis-server redis.conf
- Fire up sidekiq with
sidekiq -r ./app.rb
- Fire up server with
shotgun
- http://127.0.0.1:9393/
To replicate directly with CouchDB, you need to make sure CORS is enabled.
export HOST=http://starwarden:[email protected]:5984
curl -X PUT $HOST/_config/httpd/enable_cors -d '"true"'
curl -X PUT $HOST/_config/cors/origins -d '"*"'
curl -X PUT $HOST/_config/cors/credentials -d '"true"'
curl -X PUT $HOST/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"'
curl -X PUT $HOST/_config/cors/headers -d \
'"accept, authorization, content-type, origin"'