Package Exports
- express-asyncify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-asyncify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
express-asyncify 
Easy support async/await to express.
Installation
$ npm install express-asyncify --saveUsage
Asyncify express application:
const express = require('express');
const asyncify = require('express-asyncify');
const app = asyncify(express());
// ...
app.get('/', async (req, res) => {
const posts = await Post.findAll();
res.render('index', {posts});
});Asyncify express router:
const express = require('express');
const asyncify = require('express-asyncify');
const app = express();
const router = asyncify(express.Router());
// ...
router.get('/', async (req, res) => {
const posts = await Post.findAll();
res.render('index', {posts});
});
app.use('/blog', router);Tests
To run the test suite, first install the dependencies, then run npm test:
$ npm install
$ npm test