To run the code export in the terminal google application credentials and run server.js file: export GOOGLE_APPLICARION_CREDENTIALS=(pwd)/emily-analytics.json node server.js