Skip to content

Commit

Permalink
Add instructions to view server logs to README
Browse files Browse the repository at this point in the history
  • Loading branch information
lisamburns committed Feb 20, 2016
1 parent 449fb0c commit c8daf4f
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# README for We Vote WebApp

![WeVoteUS](wevotelogo.png)
![WeVoteUS](wevotelogo.png)

[![Build Status](https://travis-ci.org/wevote/WebApp.svg?branch=develop)](https://travis-ci.org/wevote/WebApp)

Expand Down Expand Up @@ -44,7 +44,7 @@ Confirm the versions of your main packages are >= to these versions:

(WebAppEnv) $ npm -v
3.3.12

## Overview of Process

1. Fork the repository to your GitHub repo.
Expand Down Expand Up @@ -74,9 +74,34 @@ You should be able to visit WebApp here:

http://localhost:3000

## Viewing server logs
If you would like to see the server logs while developing, you can follow these steps.

### Get an SSH key
1. If you already have an SSH key you'd like to use, skip to the next section. Otherwise...
2. Open a terminal on your local computer and enter the following: ssh-keygen -t rsa -C "[email protected]" ...
3. Just press <Enter> to accept the default location and file name. ...
4. Enter, and re-enter, a passphrase when prompted. ...
5. You're done!

### Get authorized and log in:
1. Run cd ~/.ssh/ at the command line.
3. Copy the contents of the file id_rsa.pub (your public key).
4. Email the key to [email protected].
5. You will receive an email with a command to login (ssh <username>@ec2-52-32-204-163.us-west-2.compute.amazonaws.com)
6. Run the command, if prompted 'Are you sure you want to continue?' Type yes.
7. You should now be logged in.

### Viewing Server Logs
1. To view server errors, run tail -F /var/log/wevote/wevoteserver.log
2. To view all the server activity, run tail -F /var/log/upstart/wevote-api.log
3. 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>
4. 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)


## Using We Vote API server Locally

The default configuration connections to our live API server at: https://api.wevoteusa.org
The default configuration connections to our live API server at: https://api.wevoteusa.org
If you would like to install the We Vote API server locally, start by reading the instructions[install WeVoteServer](https://github.com/wevote/WeVoteServer/blob/master/README_API_INSTALL.md)

## After Installation: Working with WebApp Day-to-Day
Expand Down

0 comments on commit c8daf4f

Please sign in to comment.