fastify-error-page

    4.0.0 • Public • Published

    fastify-error-page

    The developer error page - print errors in structured HTML to the browser

    image

    Install

    npm i fastify-error-page --save
    

    Usage

    const fastify = require('fastify')()
     
    if(process.env.NODE_ENV !== 'production') fastify.register(require('fastify-error-page'))
     
    fastify.get('/', async function (req, reply) {
      throw new Error('Opppps!')
    })
     
    fastify.listen(3000, err => {
      if (err) throw err
      console.log('Server listenting on localhost:', fastify.server.address().port)
    })

    Credits

    • youch Pretty error reporting for Node.js 🚀

    Keywords

    none

    Install

    npm i fastify-error-page

    DownloadsWeekly Downloads

    159

    Version

    4.0.0

    License

    ISC

    Unpacked Size

    70.6 kB

    Total Files

    12

    Last publish

    Collaborators

    • starptech