Giter Club home page Giter Club logo

democracy.io's Introduction

Democracy.io

Build Status

Express & Angular app for sending messages to Senate and House members

(c) 2015 Electronic Frontier Foundation

Table of Contents

Background Info

Democracy.io is an app for contacting Senate & House members. It provides a user friendly wrapper around the individual member contact forms.

It uses APIs from:

Getting started

Redis

Ensure that Redis is running locally:

sudo apt-get install redis-server

or install manually via http://redis.io/topics/quickstart - making sure to read the "Securing Redis" section, especially if you install Redis manually.

App dependencies & build

npm install
npm run build

credentials

You can generate required creds by running

node bin/gen-creds.js

or:

After you've run npm install generate a salt for encrypting IP addresses and store it in your local.json file, under: SERVER > CREDENTIALS > IP > SALT

var bcrypt = require('bcrypt');
var salt = bcrypt.genSaltSync(10);
console.log(salt);

Set a session secret and store it in your local.json file, under: SERVER > CREDENTIALS > SESSION > SECRET

App Configuration

App config is controlled via the node-config module.

To set credentials, create a local-dev.json file under the config dir and override the SERVER.CREDENTIALS setting.

Alternately, you can use:

Run tests

npm run test

Running the server locally

Spins up a local server to serve the app, including proxying browsersync on top of the express server.

gulp serve

Deploying

To deploy the server, simply run:

pm2 deploy ecosystem.json5 production

For more instructions on setting up a production server, check /deployment/README.md.

Angular app

See the www/README.md for details

democracy.io's People

Contributors

b-carter avatar chrisantaki avatar eff-test avatar emma-sg avatar hainish avatar jkup avatar mfb avatar randylubin avatar sinak avatar tariqajyusuf avatar tas50 avatar vbrown608 avatar volker-e avatar wioux avatar

Watchers

 avatar  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.