Ruby / Roda - Web Framework / Plugins / :heartbeat


Introduction

The :heartbeat handles heartbeat / status requests.

If a request for the heartbeat path comes in, a 200 response with Content-Type: text/plain and a body of 'OK' will be returned.

The default heartbeat path is '/heartbeat', so to use that:

plugin :heartbeat

You can also specify a custom heartbeat path:

plugin :heartbeat, path: '/status'

InstanceMethods

If the request is for a heartbeat path, return the heartbeat response.

#.call