Jug: New jug instance

Description Usage Examples

Description

Creates a new jug instance which can be build upon with other functions (middlewares).

Usage

1
jug()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# This Hello World example will serve a jug instance on the default port.
# The jug instance will return "Hello World!" if a GET request is send to it.
# The result of this has to be piped to 'serve_it()' in order to launch the API.
jug() %>%
 get("/", function(req, res, err) "Hello World!" ) %>%
 simple_error_handler_json()

## End(Not run)



## Not run: 
# Introduction to jug
vignette("jug", package="jug")

## End(Not run)

Bart6114/jug documentation built on May 5, 2019, 10:26 a.m.