Goal
probot-serverless-now
is a wrapper around Probot to run your GitHub Apps as Serverless Functions with ZEIT Now.
Usage
-
app.js
module {app;}; -
api/index.js
const toLambda = ;const applicationFunction = ;moduleexports = ; -
now.json
Supported Probot Features
- Logging
- Sentry integration
- 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 pagePOST /
: webhook handler
- Multiple applications running under the same Probot instance.
Instead, you should create multiple Now Lambdas.
Each lambda should have its own
now.json
file since they won't share the sameAPP_ID
,PRIVATE_KEY
, andWEBHOOK_SECRET
environment variables. To do that, you could either use multiple repositories or a mono-repo with Yarn workspaces or Lerna for instance.