Creates a new jug instance which can be build upon with other functions (middlewares).
1 | jug()
|
1 2 3 4 5 6 7 8 9 10 11 | # 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.
jug() %>%
get("/", function(req, res, err) "Hello World!" ) %>%
simple_error_handler_json() %>%
serve_it(verbose=TRUE)
# Introduction to jug
vignette("jug", package="jug")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.