How to call Google Calendar API

I am trying to use Google Calendar’s API code, and it doesn’t work as expected. I thought, app would call index.html and a functioning authorization and calendar invite would display. Any help would be great

Running node app.js in terminal. Expected authorization function would run when authorize button clicked

https://github.com/byrnenp/googapi