Here's my updated script that finally worked, thanks to your help! I had to put the account name twice in the resources, add parentheses to the table name and update the stringToSign a bit, I had the word GET which was unnecessary.
const crypto = require('crypto');
const accountName = 'devstoreaccount1';
const accountKey = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==';
const tableName = 'AuditLogs()';
const date = new Date().toUTCString();
const canonicalizedResource = `/${accountName}/${accountName}/${tableName}`;
const stringToSign = `${date}\n${canonicalizedResource}`;
const signature = crypto
.createHmac('sha256', Buffer.from(accountKey, 'base64'))
.update(stringToSign, 'utf8')
.digest('base64');
const authorizationHeader = `SharedKeyLite ${accountName}:${signature}`;
console.log(`Date: ${date}`);
console.log(`Authorization: ${authorizationHeader}`);