0.1.7 • Published 3 years ago
sheetsql-v2 v0.1.7
SheetSQL
This is just forked version of original package sheetsql but supports reading info from env variable instead of json file. In most of the case the original one is more than enough.
Usage
import Database from 'sheetsql-v2';
export const db = new Database({
db: process.env.SPREADSHEET_ID, // sheet id
table: process.env.SPREADSHEET_NAME, // sheet name, default = Sheet1
cacheTimeoutMs: 5000, // optional, default = 5000
clientEmail: process.env.GOOGLE_SHEETS_CLIENT_EMAIL,
privateKey: (process.env.GOOGLE_SHEETS_PRIVATE_KEY || '').replace(
/\\n/g,
'\n'
),
});
0.1.7
3 years ago