No description, website, or topics provided.
Shell Scala Batchfile
Latest commit c7b03a5 May 18, 2016 @jamesward better instructions
Permalink
Failed to load latest commit information.
bin fix password May 5, 2016
project init May 5, 2016
src/main bind to all interfaces May 5, 2016
.gitignore init May 5, 2016
Procfile init May 5, 2016
README.md better instructions May 17, 2016
app.json better instructions May 17, 2016
build.sbt init May 5, 2016
sbt better instructions May 17, 2016
sbt-launch.jar better instructions May 17, 2016
sbt.bat better instructions May 17, 2016

README.md

PredictionIO EventServer for Heroku

Run locally:

  1. Start a Postgres server
  2. Start the event server:

    source bin/env.sh && ./sbt run
    
  3. Create an app:

    source bin/env.sh && ./sbt "runMain io.prediction.tools.console.Console app new <APP NAME>"
    
  4. List apps:

    source bin/env.sh && ./sbt "runMain io.prediction.tools.console.Console app list"
    
  5. 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
  1. Check out the demo data:

    http://localhost:7070/events.json?accessKey=&limit=-1

Run on Heroku:

  1. Deploy: Deploy on Heroku
  2. List apps:

    heroku run console app list
    
  3. Create an app:

    heroku run console app new <APP NAME>