Skip to contents

Hosts a file server from a specified directory. See [beakr](https://github.com/MazamaScience/beakr) for more information.

Usage

file_server(hostDir, host = "127.0.0.1", port = 8080)

Arguments

hostDir

A directory to host files from

host

A string with a valid IPv4 or IPv6 address to listen on, Defaults to localhost "127.0.0.1"

port

An integer that indicates the port to listen on.

Value

A Beakr class object server defining a server instance

Examples

# \donttest{

# Host files in temporary directory
fs <- file_server(hostDir = tempdir())
#> Loading required namespace: beakr

# Stop server
beakr::stopServer(fs)
# }