← Back

Probot Apps with a UI

We’ve seen a lot of fantastic Probot Apps pop up that have helped people automate all the things, but there’s a whole feature-set that many apps aren’t taking advantage of.

Let’s take a look at some features of Probot by digging into the codebase, and explore how to bring interactivity to your Probot App.

Probot as an Express server

Something that is often overlooked is that Probot, at its core, is an Express server with a fancy POST endpoint for handling webhook payloads:

// https://github.com/probot/probot/blob/HEAD/src/server.ts
export const createServer = (args: ServerArgs) => {
  const app: express.Application = express()

  app.use(logRequest({ logger: args.logger }))
  app.use('/probot/static/', express.static(path.join(__dirname, '..', 'static')))
  app.use(args.webhook)
  app.set('view engine', 'hbs')
  app.set('views', path.join(__dirname, '..', 'views'))
  app.get('/ping', (req, res) => res.end('PONG')