Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express-async-errors

const express = require('express');require('express-async-errors');
const User = require('./models/user');
const app = express(); 
app.get('/users', async (req, res) => {
  const users = await User.findAll();  
  res.send(users);
});
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
6+7 =