Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 2.01 KB

File metadata and controls

40 lines (29 loc) · 2.01 KB

How to upload file to Google Drive

  1. To get access to the Google Account (Plus) API you will first need to create an app by visiting the google developer console: https://console.developers.google.com
  1. Install hapi-auth-google from NPM

npm install hapi-auth-google --save

  1. Export the Required Environment Variables

Once you've created your app you will have generated client_id and client_secret.

GOOGLE_CLIENT_ID=YourAppsClientId.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=SuperSecret
PORT=8000
BASE_URL=http://localhost:8000 # Must be identical to "Authorized JavaScript Origin"
  1. Create an empty file in the lib folder and call it tokens.json (your tokens will be saved into this file see L5)

  2. Install all needed dependencies see L24-L31

Reference: