index.js of the node.js application (not the best place to do this in the long run, but ok to get started). To save the events to a log, you could write to an SQL table (Heroku provides a free PostgreSQL database). Then add an endpoint to the node.js app to read the table from the database and display it.
Once the application works on your local machine, all it takes to deploy to Heroku is to push your code using git.
On the other hand, if the only thing you want is a log of events, you could just do
particle subscribe mine on your local machine and save that to a file, or add a library to your Photon firmware to log events to ThingSpeak.