Skip to content
This repository

badger badger badger badger

This branch is 0 commits ahead and 804 commits behind v2.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Clothespin (or clopenbadger, whatever)

Badging for webmaker.

Installing deps & starting the server

$ make     # will do `npm install` and then start server

Running the test suite

$ make test         # normally you'd use this
$ make verbose-test # if you want to see debugging
$ make lint         # to lint the codebase

Local configuration

Here is an example configuration. This assumes you are running redis and mongo locally.

export OPENBADGER_HOST="localhost"
export OPENBADGER_SECRET="badgerbadgerbadgerbadger"
export OPENBADGER_REDIS_HOST="localhost"
export OPENBADGER_MONGO_HOST="localhost"
export OPENBADGER_MONGO_DB="openbadger"
export OPENBADGER_ADMINS='["*@mozilla(foundation)?.org"]'

You can either paste that directly into your terminal, or you can put that in a file and source it. For example, if you save a version of this at, do:

$ source

Heroku configuration

You should only have to do the following once:

$ heroku login
    Enter your Heroku credentials.
    Could not find an existing public key.
    Would you like to generate one? [Yn] 
    Generating new SSH public key.
    Uploading ssh public key /Users/brian/.ssh/

$ heroku create
    Creating evening-fjord-7837... done, stack is cedar |
    Git remote heroku added

$ git push heroku master
    Counting objects: 23, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (13/13), done.
    Writing objects: 100% (13/13), 1.26 KiB, done.
    Total 13 (delta 9), reused 0 (delta 0)

    -----> Heroku receiving push
    -----> Node.js app detected
    -----> Resolving engine versions
           Using Node.js version: 0.8.11
           Using npm version: 1.1.49
    -----> Fetching Node.js binaries
    -----> Vendoring node into slug
    -----> Installing dependencies with npm
           npm http GET
           npm http GET
           Dependencies installed
    -----> Building runtime environment
    -----> Discovering process types
           Procfile declares types -> web
    -----> Compiled slug size: 11.2MB
    -----> Launching... done, v21
  deployed to Heroku

       bcd2285..cce42fa  master -> master

$ heroku ps:scale web=1
    Scaling web processes... done, now running 1

Now, you must set the heroku environment configs. It's very similar to setting local env configs, only you use heroku config:add instead of export:

heroku config:add OPENBADGER_HOST=""
heroku config:add OPENBADGER_PROTOCOL="http"
heroku config:add OPENBADGER_PORT=80
heroku config:add OPENBADGER_LOGDIR='.'
heroku config:add OPENBADGER_SECRET="19ofOKiFSr8aCyRpH2ohmfh5O7dOpReCHa9vkeoWJCWP72oVb"
heroku config:add OPENBADGER_REDIS_HOST=""
heroku config:add OPENBADGER_REDIS_PORT=6379
heroku config:add OPENBADGER_MONGO_HOST=""
heroku config:add OPENBADGER_MONGO_PORT=27017
heroku config:add OPENBADGER_MONGO_DB="openbadger"
heroku config:add OPENBADGER_ADMINS='["*@mozilla(foundation)?.org"]'

Deploying to Heroku

$ make heroku    # deploy if out of date & opens in your browser
Something went wrong with that request. Please try again.