# Auditor

Receives events from Ownership ingestion.  
Writes them to DynamoDB
Sends them to websocket connection for consumption by client.

## Install
`yarn`

## Run
Load up AWS dev account config and credentials so that they'll be used when the app starts. 
I use
`awsume dev`
Give your use the correct permissions to receive from https://sqs.us-east-1.amazonaws.com/103233932089/rcs-test-ownership 
`yarn start`

## Verify running
 `curl localhose:3000/health`

## Fake some events
ensure you have an aws profile called dev. Or change that bit of listOfSqsCommands. 
What we want to do is iterate our list of commands, calling each one in turn.  All the do is send dummy events 
onto our SQS queue.  Auditor is subscribed to that queue, so will consume the messages, and send them to the websocket
connection. 
```
    while read x; do  eval $x  && sleep 2; done < listOfSqsCommands
```
