fake-api-gateway-lambda
fake-api-gateway-lambda copied to clipboard
Allow for setting max memory / runtime settings
This requires checking in 3 languages, something like
setInterval(() => {
const ht = process.memoryUsage().heapTotal
const mb = Math.round(ht / 1024 / 1024 * 100) / 100)
if (ht >= MAX_MEM) process.exit(EXIT_CODE)
}, 512)
setTimeout(() => {
process.exit(EXIT_CODE)
}, MAX_RUNTIME)