Socket
Book a DemoInstallSign in
Socket

@owliehq/async-wrapper

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@owliehq/async-wrapper

Async wrapper for express

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
24
242.86%
Maintainers
4
Weekly downloads
 
Created
Source

Async-Wrapper

Getting Started

1. Install Async wrapper request handler

$ npm install express
$ npm install @owliehq/async-wrapper

2. Basic usage (give it a try)

const express = require('express')
const asyncWrapper = require('@owliehq/async-wrapper')

const app = express()

const route = async (req, res) => {
  const data = await fetchSomeData()
  res.status(200).json(data)
}

app.get('/route', asyncWrapper(route))

app.listen(3000, () => {
  console.log('Express serve with async/await support!')
})

Start server

$ node app.js

Getting Support

  • Check out GitHub issues opened, send us an mail
  • To file a bug: create a GitHub issue on this repo. Be sure to include details about how to replicate it.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

Copyright (c) 2019

Licensed under MIT

FAQs

Package last updated on 27 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.