express async errors

Solutions on MaxInterview for express async errors by the best coders in the world

showing results for - "express async errors"
Javier
14 Aug 2020
1const express = require('express');require('express-async-errors');
2const User = require('./models/user');
3const app = express(); 
4app.get('/users'async (req, res) => {
5  const users = await User.findAll();  
6  res.send(users);
7});