Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jangbl/express-error-handling
demonstrates how to do error handling in express
https://github.com/jangbl/express-error-handling
api-error error error-handler error-handling express express-js expressjs javascript node
Last synced: about 2 months ago
JSON representation
demonstrates how to do error handling in express
- Host: GitHub
- URL: https://github.com/jangbl/express-error-handling
- Owner: jangbl
- Created: 2020-06-07T09:14:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-13T10:56:15.000Z (over 1 year ago)
- Last Synced: 2024-10-03T21:37:57.686Z (3 months ago)
- Topics: api-error, error, error-handler, error-handling, express, express-js, expressjs, javascript, node
- Language: JavaScript
- Size: 287 KB
- Stars: 30
- Watchers: 1
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Error Handling in express
This repository contains sample code on how to do error handling with the Node.js [express](https://expressjs.com/) framework.
Please help this repo with a ⭐️ if you find it useful! 😁
This repository is part of the [Error Handling in express](https://youtu.be/DyqVqaf1KnA) tutorial provided by [productioncoder.com](https://productioncoder.com/).
[![Error Handling in express](images/error-handling-in-express.png)](https://youtu.be/DyqVqaf1KnA)
For updates, please reach out to [@_jgoebel](https://twitter.com/_jgoebel) on Twitter.
## Session implementation with express.js and express-session
This repository illustrates how to handle expected errors in a DRY way in express and how to not expose any internal structure in case of unexpected errors.
## Running this project
Run
```
npm install
```to install the project's dependencies.
Execute the `dev` script to start up your server.
```
npm run dev
```## API
### POST /tweet
Expected payload
```
{
"msg": "my tweet message"
}
```