gd-pages

1.1.0 • Public • Published

Google Drive Pages Build Status Join the chat at https://gitter.im/ButuzGOL/gd-pages

Publish your static files to Google Drive server and share
Inspired by Host webpages with Drive

Install

$ sudo npm install -g gd-pages

Creating a Service Account using the Google Developers Console

  1. From the Google Developers Console, select your project or create a new one.

  2. Under "APIs & auth", click "Credentials".

  3. Under "OAuth", click the "Create new client ID" button.

  4. Select "Service account" as the application type, key type "P12 Key" and click "Create Client ID".

  5. The key for your new service account should prompt for download automatically.

  6. Go to "APIs" than enable "Drive API" and "Drive SDK"

Notice: was taken from https://github.com/extrabacon/google-oauth-jwt

Usage

It waits for 4 parameters:

  1. Service account -> Email address
  2. Path to pem file
  3. Path to folder for upload
  4. Folder name
  5. Sub folder (optional) can be useful for example: project-name/dev
$ gd-pages 525-8om6ltm23s2ep4@developer.gserviceaccount.com ./Test-39c6f.p12 ./dist project
var gdPages = require('gd-pages');
 
gdPages('525-8om6ltm23s2ep4@developer.gserviceaccount.com', './Test-39c6f.p12', './dist', 'project');

License

MIT © ButuzGOL

Package Sidebar

Install

npm i gd-pages

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • butuzgol