If you would like to see the server logs while developing, you can follow these steps.
- If you already have an SSH key you'd like to use, skip to the next section. Otherwise...
- Open a terminal on your local computer and enter the following: ssh-keygen -t rsa -C "[email protected]" ...
- Just press to accept the default location and file name. ...
- Enter, and re-enter, a passphrase when prompted. ...
- You're done!
- Run cd ~/.ssh/ at the command line.
- Copy the contents of the file id_rsa.pub (your public key).
- Email the key to [email protected].
- You will receive an email with a command to login (ssh @ec2-52-32-204-163.us-west-2.compute.amazonaws.com)
- Run the command, if prompted 'Are you sure you want to continue?' Type yes.
- You should now be logged in.
- To view server errors, run tail -F /var/log/wevote/wevoteserver.log
- To view all the server activity, run tail -F /var/log/upstart/wevote-api.log
- To only view activity that is coming from localhost:3000 on your computer, run tail -F /var/log/upstart/wevote-api.log | grep <voter_device_id>
- Note: You can get your device_id by navigating to localhost:3000, opening chrome developer tools and finding the cookie labeled voter_device_id (under Resources > Cookies > Localhost)