Clone or download
sdn90 Fixes (#128)
* Fix broken email on Email Delivery API link

* Fix Copyright message
Latest commit 4bb75f5 Dec 6, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
analysis Adds in an analysis script to parse the contact-congress YAML files t… Apr 30, 2015
bin Use js for update-congress script Oct 20, 2016
config Add a maintenance page, shown in MAINTENANCE_MODE Mar 28, 2017
deployment Updates readme with more accurate deploy instructions. Feb 11, 2016
gulp Need ngRaven dependency to use Raven angular plugin Feb 17, 2017
models Update canonical-address.js Aug 6, 2017
server Fixes (#128) Dec 6, 2018
test Disables and shows warning message for defunct MoC Apr 17, 2017
www Change maintainer info (#127) Dec 6, 2018
.env.example Use raven/ravenjs to report errors to sentry Feb 17, 2017
.gitignore Ignore .env Feb 15, 2017
.travis.yml Update .travis.yml Aug 25, 2017
Dockerfile Upgrade Dockerfile to Node 8 LTS Sep 12, 2018
LICENSE Updates license, fixes #29 Jul 9, 2015 Update documentation/notice. Congress API no longer used. Oct 20, 2016
congress.json Removes special characters from congress.json May 15, 2017
docker-compose.yml.example Don't recommend volumizing ./config:/opt/ in devel… Feb 17, 2017
ecosystem.json5 Refactors the app to: Jul 17, 2015 Use node:7-alpine image in Dockerfile Aug 15, 2017
gulpfile.js Refactors the app to: Jul 17, 2015
package-lock.json Upgrade Dockerfile to Node 8 LTS Sep 12, 2018
package.json Upgrade Dockerfile to Node 8 LTS Sep 12, 2018
server.js Attempts to make the codebase more of a standard express app, removes… Aug 18, 2015

Build Status

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

(c) 2015 Electronic Frontier Foundation

Table of Contents

Background Info 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


Ensure that Redis is running locally:

sudo apt-get install redis-server

or install manually via - making sure to read the "Securing Redis" section, especially if you install Redis manually.

App dependencies & build

npm install
npm run build


You can generate required creds by running

node bin/gen-creds.js


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);

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


To deploy the server, simply run:

pm2 deploy ecosystem.json5 production

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

Angular app

See the www/ for details