Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 2.58 KB

README.md

File metadata and controls

52 lines (40 loc) · 2.58 KB

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.