airtable leden print test

This commit is contained in:
Kiara Grouwstra 2021-09-28 22:35:12 +02:00
parent fac596fa60
commit 69a283be52
2 changed files with 19 additions and 2 deletions

View File

@ -6,6 +6,9 @@ BIJ1 Compliance Facilitator App
If you also want to develop you'll want to run:
`npm install --also=dev`
set the [AirTable API key](https://airtable.com/account):
`export AIRTABLE_API_KEY=MY_API_KEY`
`npm start` launches the app
`npm run test` launches the tests (using JSHint and Jest)

View File

@ -1,4 +1,18 @@
"use strict";
const Airtable = require('airtable');
console.log('BIJ1 Compliance Facilitator App');
console.log('===============================');
const base = 'appXWc6Btm4KkIg8G';
const table = 'leden';
const airtable = new Airtable({});
airtable
.base(base)
.table(table)
.select()
.firstPage()
// .eachPage()
// .forEach()
.then(records => {
records.forEach(record => {
console.log(record.fields);
});
});