api: API

Description Usage Arguments Details Functions Examples

Description

Return path to API file.

Usage

1
2
3
run_api(host = "0.0.0.0", port = 3000)

scaffold_api()

Arguments

host, port

Host and port passed to plumber.

Details

The scaffold_api function copies the files necessary to deploy the the api using docker. Make sure you do so from the directory that contains your configuration file (create_config). Once copied run docker build -t coronavirus . to build the docker image with your config file. Then run docker run -p 80:8000 -d coronavirus where 80 is the port you want to map to (of your machine).

Functions

Examples

1
## Not run: run_api()

JohnCoene/coronavirus documentation built on July 15, 2020, 4:58 a.m.