airtable leden print test
This commit is contained in:
parent
fac596fa60
commit
69a283be52
|
@ -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)
|
||||
|
|
18
src/app.js
18
src/app.js
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue