An open API service indexing awesome lists of open source software.

https://github.com/tchayen/drive-editor

Simple text editor storing all files on Google Drive
https://github.com/tchayen/drive-editor

create-react-app google-drive-api react typescript

Last synced: over 1 year ago
JSON representation

Simple text editor storing all files on Google Drive

Awesome Lists containing this project

README

          

# drive-editor

Very simple text editor storing all files on Google Drive in directory `drive-editor`. Uses recommended security scope which permits the app to create/update/delete only the files created in it.

[Live demo](https://drive-editor.now.sh)

## Setup

It is a bit more complicated since you need to setup a Google API project, enable drive for it and connect the app. Most of the problematic setup can be done with the guide linked in the instructions.

1. Clone the project.
2. Visit the directory in terminal and run `yarn` to install dependencies.
3. Visit [Browser QuickStart](https://developers.google.com/drive/api/v3/quickstart/js) guide and use `Enable the Drive API` and `Create API key` to easily obtain credentials without digging through the Google Console.
4. You are interested in `clientId` and `apiKey`. Save them to `src/config.json`:

```json
{
"clientId": "XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com",
"apiKey": "XXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXX"
}
```

5. Update URI of the local app in console
- Visit [Google APIs Console](https://console.developers.google.com/).
- Open the project.
- Go to `Credentials`.
- Open `OAuth client`.
- Update `URIs` from `http://localhost:8000` to `http://localhost:3000` (used by CRA).
6. Done!