Run locally:
-
Start a Postgres server
-
Start the event server:
source bin/env.sh && ./sbt run
-
Create an app:
source bin/env.sh && ./sbt "runMain io.prediction.tools.console.Console app new <APP NAME>"
-
List apps:
source bin/env.sh && ./sbt "runMain io.prediction.tools.console.Console app list"
-
Add some demo data:
export ACCESS_KEY=<YOUR ACCESS KEY>
for i in {1..5}; do curl -i -X POST http://localhost:7070/events.json?accessKey=$ACCESS_KEY -H "Content-Type: application/json" -d "{ \"event\" : \"\$set\", \"entityType\" : \"user\", \"entityId\" : \"u$i\" }"; done
for i in {1..50}; do curl -i -X POST http://localhost:7070/events.json?accessKey=$ACCESS_KEY -H "Content-Type: application/json" -d "{ \"event\" : \"\$set\", \"entityType\" : \"item\", \"entityId\" : \"i$i\", \"properties\" : { \"categories\" : [\"c1\", \"c2\"] } }"; done
for i in {1..5}; do curl -i -X POST http://localhost:7070/events.json?accessKey=$ACCESS_KEY -H "Content-Type: application/json" -d "{ \"event\" : \"view\", \"entityType\" : \"user\", \"entityId\" : \"u$i\", \"targetEntityType\" : \"item\", \"targetEntityId\" : \"i$(( ( RANDOM % 50 ) + 1 ))\" }"; done
-
Check out the demo data:
Run on Heroku: