Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples how to use port4me with different R packages #76

Open
HenrikBengtsson opened this issue Apr 18, 2024 · 0 comments
Open

Examples how to use port4me with different R packages #76

HenrikBengtsson opened this issue Apr 18, 2024 · 0 comments

Comments

@HenrikBengtsson
Copy link
Owner

HenrikBengtsson commented Apr 18, 2024

Plumber

The plumber package serves a REST API at a specific TCP port. By default, it picks a random port. To use a port4me-generated port, use:

pr_run(..., port = port4me::port4me("plumber"))

To make this the default port up-front, use:

options(plumber.port = port4me::port4me("plumber"))
pr_run(...)

or

PLUMBER_PORT=$(port4me plumber) R

It is not possible to set the default such that port4me() is called when pr_run() is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant