@knapsack/app
Version:
Build Design Systems on top of knapsack, by Basalt
14 lines (12 loc) • 471 B
JavaScript
/*
this file will loop through all js modules which are uploaded to the lambda resource,
provided that the file names (without extension) are included in the "MODULES" env variable.
"MODULES" is a comma-delimmited string.
*/
exports.handler = (event, context, callback) => {
const modules = process.env.MODULES.split(',');
for (let i = 0; i < modules.length; i += 1) {
const { handler } = require(modules[i]);
handler(event, context, callback);
}
};