No description
  • HTML 65.8%
  • JavaScript 33.6%
  • Shell 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-01-02 15:00:04 -08:00
.openshift Nicely working version. 2013-12-18 15:00:24 -08:00
bin Nicely working version. 2013-12-18 15:00:24 -08:00
lib Functioning rsvg on the new server, so switch skeleton to thin non-repro blue. 2014-01-02 15:00:04 -08:00
node_modules Nicely working version. 2013-12-18 15:00:24 -08:00
COPYING Nicely working version. 2013-12-18 15:00:24 -08:00
deplist.txt Creating template 2013-12-18 15:03:51 -05:00
index.html Creating template 2013-12-18 15:03:51 -05:00
package.json Fix xmlbuilder version in package.json . 2013-12-21 14:29:11 -08:00
README.md Convert image to raster before posting to tumblr so it displays in previews and on mobile devices. 2013-12-20 21:46:05 -08:00
server.js Nicely working version. 2013-12-18 15:00:24 -08:00

This is the online node.js reimplementation of draw-something.

It runs on OpenShift and posts images to tumblr.

You will need accounts on OpenShift and tumblr to use it. OpenShift is free software, tumblr isn't.

Some notes on installation follow.

  • Register a tumblr app, and authenticate here:

https://api.tumblr.com/console/

  • Register for OpenShift here:

https://www.openshift.com/app/account/news

  • Create an OpenShift node app:

rhc app create nodejs-0.10 rhc cartridge add mongodb-2.2 -a rhc cartridge add cron-1.4 -a

  • In OpenShift, install required software:

ssh [your OpenShift application] cd $OPENSHIFT_DATA_DIR

We need librsvg to allow ImageMagick to handle SVG

wget ftp://ftp.muug.mb.ca/mirror/centos/6.4/os/x86_64/Packages/librsvg2-2.26.0-5.el6_1.1.0.1.centos.x86_64.rpm rpm2cpio librsvg2-2.26.0-5.el6_1.1.0.1.centos.x86_64.rpm | cpio -idmv exit

  • Set an important evironment variable

rhc env set DRAW_SOMETHING_MONGO_URI="" --app rhc app restart --app

  • And create a config (inserting the correct values...):

ssh [your OpenShift application] mongo -u -p --host --port db.config.insert({ tumblr_consumer_key: '', tumblr_consumer_secret: '', tumblr_access_token: '', tumblr_access_secret: '', tumblr_blog_url: '.tumblr.com', working_directory: '/tmp', image_width : 640, image_height : 480, points_min : 4, points_max : 20 }) exit exit