New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@valora/http-handler

Package Overview
Dependencies
Maintainers
10
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@valora/http-handler

Handle logging and errors in your Google Cloud Function HTTP endpoint implementations.

0.0.1
latest
npm
Version published
Maintainers
10
Created
Source

@valora/http-handler

Handle logging and errors in your Google Cloud Function HTTP endpoint implementations.

Development

Install dependencies:

yarn

Run tests:

yarn test

Using

Add @valora/http-handler:

yarn add @valora/http-handler

Define your HttpFunction:

import {
  HttpFunction,
  Request,
  Response,
} from '@google-cloud/functions-framework/build/src/functions'
import { createLogger } from '@valora/logging'
import { asyncHandler } from '@valora/http-handler'

// Any Bunyan logger
const logger = createLogger()

const requestHandler: HttpFunction = async (req: Request, res: Response) => {
  res.status(200).send({ message: 'hello' })
}

const export helloCloudFunctionHandler = asyncHandler(requestHandler, logger)

FAQs

Package last updated on 11 Apr 2023

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