
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
db-google-spreadsheets
Advanced tools
Use Google Spreadsheet as DB and Worksheets as Tables:
Create oauth2.keys.json file with your Google App id and secret as shown in example_oauth2.keys.json
You may need a CLIENT_ID, CLIENT_SECRET and REDIRECT_URL. You can find these pieces of information by going to the Developer Console, clicking your project --> APIs & auth --> credentials.
Then execute quickstart.js file to get the oauth2.token.json file and use the module.
var params = {
spreadsheetId: "189ubij3PIK7ujsoSXXXXr3hsZqap_4w",
worksheetName: "Users"
};
var sheet = Spreadsheet(params);
Example Spreadsheet Data:

var rows = await sheet();
console.log(rows)
Console output:
[ Row { email: 'one@test.com', useCount: '0' },
Row { email: 'two@test.com', useCount: '0' },
Row { email: 'three@test.com', useCount: '0' } ]
var editRow = rows.filter((row) => row.email === 'two@test.com')[0]
editRow.useCount++;
editRow.date = '20/10/2019'
editRow.save()
Updated Spreadsheet:

Note that it automatically added the new Date column
var newRow = sheet({
email: "yo@brother.com",
useCount: 19
});
await newRow.save();
Updated Spreadsheet:

Note that it automatically added the new Date column
var rows = await sheet();
console.log(rows)
Console output:
[ Row { email: 'one@test.com', useCount: '0' },
Row { email: 'two@test.com', useCount: '1', date: '20/10/2019' },
Row { email: 'three@test.com', useCount: '0' },
Row { email: 'yo@brother.com', useCount: '19' } ]
The first row is reserved for the column names, so that order of columns and row two is used for human-friendly names that can be modified without affecting the DB.

This first row can be hidden for better visualization with right-click -> hide Row:

FAQs
Use Google Spreadsheets as DB for simple projects
We found that db-google-spreadsheets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.