Skip to content

Bernie-2016/votetracker

Repository files navigation

VoteTracker

Dependencies

The following will need to be installed on your local development machine before you can use this workflow. All versions should be the latest available, as some required features may not be available in older versions.

Required for Development

Development

  1. Run npm install to install local dependencies.
  2. Run vagrant up to set up postgresql database.
  3. Run npm run migrate:up to initialize the database model.
  4. Run vagrant ssh -- cat /mnt/vagrant/fixtures/*.sql \| psql -U postgres votetracker to import the fixtures.
  5. Run npm start to start the file-watcher, api and live-reload process.
  6. Browse to http://localhost:8080/ for the client.
  7. Browse to http://localhost:8000/ or http://localhost:8080/api/ for the server.
  8. Edit files in src/client to see things update automatically.
  9. Edit files in src/server and the server will automatically restart.

Production Notes

In production, the server component is mounted at: http://votetracker.berniesanders.com/api

Troubleshooting Local Environment

Vagrant port forwarding issue "The forwarded port to 5432 is already in use on the host machine."

If you see this error, it's possible you've already got postgres (the database) already running on your machine. If you're on a 'nix system, try entering sudo service --status-all at the command line. If you see something that looks like this [ + ] postgresql in the output, stop the service by entering sudo service postgresql stop and attempt to bring up vagrant again.

About

VoteTracker -- react/node.js app for real time crowdsourced reporting -- https://votetracker.berniesanders.com/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published