This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const Puppeteer = require('puppeteer'); | |
module.exports = { | |
method: 'GET', | |
path: '/debug', | |
handler: async (request) => { | |
let browser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Adapted from Exiting README example: https://github.com/kanongil/exiting | |
const Boom = require('@hapi/boom'); | |
const Exiting = require('exiting'); | |
const Hapi = require('@hapi/hapi'); | |
const server = Hapi.Server(); | |
const manager = Exiting.createManager(server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/* | |
Inspired by ideas in: | |
- https://www.joyent.com/node-js/production/design/errors | |
- https://www.usenix.org/legacy/events/hotos03/tech/full_papers/candea/candea.pdf | |
*/ |