0

我想知道是否可以从 GitHub Pages 或 Amazon S3 在我的 Jekyll 页面中运行 Node.js 脚本?我认为它不能在 GitHub Pages 上运行,因为它不支持服务器端代码。不太确定。代码如下:

var Airtable = require('airtable');
var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('appAnZVyYqusNPV5Q');

base('Invitee list').select({
    // Selecting the first 3 records in Complete list:
    maxRecords: 3,
    view: "Complete list"
}).eachPage(function page(records, fetchNextPage) {
    // This function (`page`) will get called for each page of records.

    records.forEach(function(record) {
        console.log('Retrieved', record.get('Email'));
    });

    // To fetch the next page of records, call `fetchNextPage`.
    // If there are more records, `page` will get called again.
    // If there are no more records, `done` will get called.
    fetchNextPage();

}, function done(err) {
    if (err) { console.error(err); return; }
});
4

0 回答 0