Giter Club home page Giter Club logo

cityvoice-survey-builder's Introduction

CityVoice Survey Builder

Running Locally

  • Clone the repo
  • Install Ruby 2.2.2 if not already installed (with rvm, rvm install 2.2.2)
  • Install dependencies with bundle install
  • Set dummy environment variables:
  • HEROKU_OAUTH_ID
  • HEROKU_OAUTH_SECRET
  • Install redis (brew install redis on OSX using homebrew)
  • Set REDISTOGO_URL to redis://localhost:6379 (or whatever your local connection is)
  • Run the app with bundle exec rackup and open your browser to http://localhost:9292

Testing

Test the builder with RSpec:

rspec

Deployment

Non-CFA users shouldn't need to deploy this, but for documentation purposes, here goes!

First, go to your account page on Heroku and under 'API Clients' click the 'Register API Client' button.

There, set the Name (whatever you want) and the OAuth Callback URL (this will be /callback on your deployment, for example: https://my-cityvoice-builder-instance.herokuapp.com/callback )

Once you've done that, note the 'ID' and 'SECRET' it gives you.

Now, clone this repo and cd into the folder. From there, create a Heroku app with your own name and the multi buildpack:

$ heroku create --buildpack https://github.com/ddollar/heroku-buildpack-multi.git my-cityvoice-builder-name

Now, configure your Builder app with the ID and SECRET from above:

$ heroku config:set HEROKU_OAUTH_ID=lolmyoauthid
$ heroku config:set HEROKU_OAUTH_SECRET=lolmysecret

Now push!

$ git push heroku master

Lastly, provision Heroku's RedisToGo add-on:

$ heroku addons:add redistogo:small

(Details and pricing [$39/mo for the small add-on shown above] can be found at: https://addons.heroku.com/RedisToGo )

Copyright Code for America Labs 2014, MIT License

cityvoice-survey-builder's People

Contributors

daguar avatar jmadans avatar migurski avatar phae avatar waltz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.