git clone git@github.com:rauno56/climbing-card-check.git
npm ci
Both env vars are required:
SPREADSHEET_ID
: Google Sheet ID used as the database. Can be extracted from a url of the sheet: https://docs.google.com/spreadsheets/d/< it's here >/edit#gid=0
GOOGLE_KEY
: Credentials to access the Google Sheets API. See below for creating and storing it in Vercel.Once your environment is set up you can run it locally or deploy to Vercel. There's abundance of documentation online for latter. Following has some simplifying steps specific to this app.
Once .env
file is set up, run it locally with npm start
.
Add the two environment vars to Vercel via the UI. And deploy the app with:
npx vercel
./key.json
of this folder;node scripts/key.to.env.cjs
and store that to your .env
file;client_email
of that key. You'll find that in the key file and it should look something like service-account-name@youruser.iam.gserviceaccount.com
.