Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hemerajs/fastify-error-page
The developer error page - print errors in structured HTML to the browser
https://github.com/hemerajs/fastify-error-page
developer-experience fastify
Last synced: about 2 months ago
JSON representation
The developer error page - print errors in structured HTML to the browser
- Host: GitHub
- URL: https://github.com/hemerajs/fastify-error-page
- Owner: hemerajs
- License: mit
- Created: 2018-01-14T17:19:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T20:00:11.000Z (about 2 years ago)
- Last Synced: 2024-04-14T05:40:32.386Z (9 months ago)
- Topics: developer-experience, fastify
- Language: JavaScript
- Homepage:
- Size: 794 KB
- Stars: 19
- Watchers: 3
- Forks: 4
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fastify - `fastify-error-page`
README
# fastify-error-page
The developer error page - print errors in structured HTML to the browser![image](demo.png)
## Install
```
npm i fastify-error-page --save
```
## Usage
```js
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](https://github.com/poppinss/youch) Pretty error reporting for Node.js 🚀