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 hapi = require('@hapi/hapi'); | |
async function main() { | |
try { | |
const server = await hapi.server(); | |
await server.register({ | |
plugin: require('hapi-pino'), |
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 Hapi = require('@hapi/hapi'); | |
async function test() { | |
const server = Hapi.server({ debug: false }); | |
server.ext('onPreResponse', (request, h) => { | |
try { | |
console.log('1', '=========='); |