Skip to content

nurullahturkoglu/nodejs-google-drive-crud-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Google Drive Crud API

Getting started

Installation

This library is distributed on npm. In order to add it as a dependency, run the following command:

$ npm install

Service account credentials

Service accounts allow you to perform server-to-server, app-level authentication using a robot account. You will create a service account, download a keyfile, and use that to authenticate to Google APIs. To create a service account:

Save the service account credential file somewhere safe, and do not check this file into source control! To reference the service account credential file, you have a few options.

Using the keyFilePath property

You need to edit the keyFilePath variable located in the services/googleDriveServices.js file.

const keyFilePath = path.join(__dirname, "./your-secret-key.json");

const auth = new google.auth.GoogleAuth({
  keyFile: keyFilePath,
  scopes: ["https://www.googleapis.com/auth/drive"],
});

Using the folderId property

You should edit the folderId variable in the services/googleDriveServices.js file according to your own folder id.

const folderId = "your-folder-id";

Helpful Resources

https://www.youtube.com/watch?v=bkaQTLCBBeo

https://medium.com/@alphatesfa789/node-js-google-drive-api-revolutionize-file-handling-with-ease-a94525eef39b

Contributing

  1. Fork the repository.
  2. Create a new feature branch:
    git checkout -b feature/your-feature-name
  3. Commit your changes:
    git commit -m 'Add some feature'
  4. Push to the branch:
    git push origin feature/your-feature-name
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published