sheetsql-v2
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

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'
  ),
});

Docs same as original package

Readme

Keywords

none

Package Sidebar

Install

npm i sheetsql-v2

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

222 kB

Total Files

34

Last publish

Collaborators

  • adarshaacharya