# @rgeraldporter/probot-serverless-now

> Probot Wrapper to run GitHub Apps as Serverless Functions in ZEIT Now

Latest version **2.1.3** (published 2020-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rgeraldporter/probot-serverless-now
pnpm add @rgeraldporter/probot-serverless-now
yarn add @rgeraldporter/probot-serverless-now
bun add @rgeraldporter/probot-serverless-now
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.3 |
| Published | 2020-02-21 |
| First published | 2020-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.10.0 |
| Dependencies | 2 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Thibault Derousseaux |
| Maintainers | rgeraldporter |
| Keywords | probot, now, lambda, serverless, zeit, zeit-now |

## Links

- npm: https://www.npmjs.com/package/@rgeraldporter/probot-serverless-now
- Repository: https://github.com/rgeraldporter/probot-serverless-now
- Homepage: https://github.com/rgeraldporter/probot-serverless-now#readme
- Issues: https://github.com/rgeraldporter/probot-serverless-now/issues
- npm.io page: https://npm.io/package/@rgeraldporter/probot-serverless-now

## Dependencies (2)

- [probot](https://npm.io/package/probot.md) ^9.8.1
- [@types/node](https://npm.io/package/@types/node.md) ^12.0.7

## Recent versions

- 2.1.3 (latest) — 2020-02-21

## README

[![npm version](https://img.shields.io/npm/v/probot-serverless-now.svg)](https://npmjs.org/package/probot-serverless-now) [![build status](https://img.shields.io/circleci/project/github/tibdex/probot-serverless-now.svg)](https://circleci.com/gh/tibdex/probot-serverless-now)

# Goal

`probot-serverless-now` is a wrapper around [Probot](https://github.com/probot/probot) to run your GitHub Apps as Serverless Functions with [ZEIT Now](https://zeit.co).

# Usage

- `app.js`

  ```javascript
  module.exports = app => {
    app.on("issues.opened", async context => {
      // A new issue was opened, what should we do with it?
      context.log(context.payload);
    });
  };
  ```

- `api/index.js`

  ```javascript
  const { toLambda } = require("probot-serverless-now");

  const applicationFunction = require("../app");

  module.exports = toLambda(applicationFunction);
  ```

- `now.json`

  ```json
  {
    "version": 2,
    "env": {
      "APP_ID": "@my-app-id",
      "PRIVATE_KEY": "@my-app-base64-encoded-private-key",
      "WEBHOOK_SECRET": "@my-app-webhook-secret"
    }
  }
  ```

## Supported Probot Features

- [x] [Logging](https://probot.github.io/docs/logging/)
- [x] [Sentry](https://probot.github.io/docs/configuration/) integration
- [x] Webhook signature verification
- [ ] Loading the private key from the filesystem.
      The `PRIVATE_KEY` environment variable should be used instead (possibly _base64_ encoded).
- [ ] Custom routing. The only routes are:
  - `GET /`: typical Probot landing page
  - `POST /`: webhook handler
- [ ] Multiple applications running under the same Probot instance.
      Instead, you should create multiple [Now Lambdas](https://zeit.co/docs/v2/deployments/concepts/lambdas/).
      Each lambda should have its own `now.json` file since they won't share the same `APP_ID`, `PRIVATE_KEY`, and `WEBHOOK_SECRET` environment variables.
      To do that, you could either use multiple repositories or a mono-repo with [Yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) or [Lerna](https://lerna.js.org/) for instance.

---
_Source: https://npm.io/package/@rgeraldporter/probot-serverless-now · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
