Beakr {beakr} | R Documentation |
Beakr Application class
Description
A Beakr
object defines the server instance utilizing the
httpuv package. This class defines an interface for the rest of the
beakr package and is therefore meant to be instantiated.
Methods
router()
-
An instantiated
Router
object. server()
-
The instantiated
Server
object. appDefinition()
-
A method to define the functions or middleware of users application.
initialize()
-
Creates a new
Router
object for therouter
method. start(host, port, daemon)
-
Returns a running server. If
daemon = TRUE
, the server will run in the background. print(...)
-
Returns a console output of the instance and its number of middleware attached.
Package details
The beakr package provides a minimal web framework for for developing
lightweight APIs in R. The package includes basic functionality for handling
common HTTP
requests. beakr is a ground-up rewrite and
continuation of the jug package developed by Bart Smeets. The
beakr package is supported and maintained by
Mazama Science.
Methods
Public methods
Method appDefinition()
Usage
Beakr$appDefinition()
Method new()
Usage
Beakr$new()
Method start()
Usage
Beakr$start(host, port, daemon)
Method print()
Usage
Beakr$print()
Method clone()
The objects of this class are cloneable with this method.
Usage
Beakr$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
Router
and Middleware