This is a utility function that can be used to server a local directory with data so that it can be used in the genome browser.

serve_data(path, port = 5000)

Arguments

path

The path to the directory with data to serve

port

The port to serve the directory on

Value

a list containing information about the newly created HTTP server including the host, port, interval, and URL. The list also contains the stop_server() function which can be used to stop the server

Details

Note: This is intended for local development and use. For a production deployment, refer to the vignette on creating URLs for more robust options.

Examples

if (FALSE) {
server <- serve_data("~/path/to/my-data")
# use server$stop_server() to stop
}