http_server: Default http server configuration for libuv hook.

Description Usage Arguments Examples

View source: R/microserver.r

Description

Default http server configuration for libuv hook.

Usage

1
http_server(routes)

Arguments

routes

list. A named list of routes, with a handler function for each route. The first unnamed route will be used as the root. If none is provided, just a 404 status will be returned.

Examples

1
2
3
4
5
## Not run: 
  http_server(list('/ping' = function(params, query) 'Hello world!',
                   function(params, query) 'Invalid route.'))

## End(Not run)

dvanderbeek/microserver-test documentation built on May 21, 2019, 8:37 a.m.