gd-pages
v1.1.0
Published
Publish your static files to Google Drive server and share
Downloads
10
Maintainers
Readme
Google Drive 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
From the Google Developers Console, select your project or create a new one.
Under "APIs & auth", click "Credentials".
Under "OAuth", click the "Create new client ID" button.
Select "Service account" as the application type, key type "P12 Key" and click "Create Client ID".
The key for your new service account should prompt for download automatically.
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:
- Service account -> Email address
- Path to pem file
- Path to folder for upload
- Folder name
- Sub folder (optional) can be useful for example: project-name/dev
$ gd-pages [email protected] ./Test-39c6f.p12 ./dist project
var gdPages = require('gd-pages');
gdPages('[email protected]', './Test-39c6f.p12', './dist', 'project');
License
MIT © ButuzGOL