Node.js Project to Upload Text Files to Google Drive as Docs Files in Browser Using google-drive-upload Library in Javascript
npm i google-drive-upload
import GoogleDriveUpload from 'google-drive-upload';
GoogleDriveUpload.init({
apiKey: 'your-api-key',
clientId: 'your-client-id',
});
GoogleDriveUpload.upload({
title: 'Document title',
text: 'Message you want to save on your Google Drive',
})
.then(() => alert("Note successfully uploaded!"));