Commit 892c02d5223d1c0b328a7ef60e7a3d8adc7e283a

Authored by James McMinn
1 parent 31a7ccea3d
Exists in master

Added instructions for using the stream

Showing 1 changed file with 12 additions and 3 deletions Side-by-side Diff

... ... @@ -14,13 +14,14 @@ Required packages can be installed using `go get packagepath`
14 14 Twitter Stream Reader can be installed using a number of methods.
15 15  
16 16 The easiest method is to simply run `main.go` using the `go run` command:
  17 +
17 18 go run main.go
18 19  
19   -To build the application binary, `go build` can be used:
  20 +To build the application binary, `go build` can be used and will generate
  21 +the binary in your current directory.
20 22  
21 23 go build mirgit.dcs.gla.ac.uk/JamesMcMinn/twitter-stream-reader
22 24  
23   -This will generate the binary in your current directory.
24 25  
25 26 ## Usage
26 27 The stream reader has 2 modes:
... ... @@ -52,4 +53,12 @@ The file should contain valid JSON, with one Tweet per line. The stream reader w
52 53 parse any JSON, and output it in the same format used the Streaming API. In this example, we also
53 54 use port 85632 rather than the default port or 8053.
54 55  
55   - go run main.go -if=/home/james/tweets.json -port=85632
56 56 \ No newline at end of file
  57 + go run main.go -if=/home/james/tweets.json -port=85632
  58 +
  59 +
  60 +## Listening to the Stream
  61 +Simply connect to the machine where the stream reader is running. To perform a quick test use the
  62 +Linux `nc` command, which will output the data it receives:
  63 +
  64 + nc localhost 8053
  65 +
57 66 \ No newline at end of file