forked from ixpantia/faucet-router-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e88cfc4
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# faucet router example | ||
|
||
## Install | ||
|
||
Install the development version of faucet: | ||
|
||
```sh | ||
cargo install --git "https://github.com/ixpantia/faucet.git" | ||
``` | ||
|
||
Install Shiny: | ||
|
||
```R | ||
install.packages("shiny") | ||
``` | ||
|
||
## Run the router | ||
|
||
```sh | ||
faucet router | ||
``` | ||
|
||
## Visit the routes | ||
|
||
- [http://localhost:3838](http://localhost:3838) | ||
- [http://localhost:3838/text/](http://localhost:3838/text/) | ||
- [http://localhost:3838/sliders/](http://localhost:3838/sliders/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shiny::runExample("01_hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# In this route we use `workdir` to start the child | ||
# R session on a different working directory. | ||
[[route]] | ||
route = "/sliders/" | ||
workers = 1 | ||
server_type = "Shiny" | ||
workdir = "./sliders" | ||
|
||
# In this route we use `app_dir` to start the R session | ||
# in the current working directory but use an app in | ||
# a directory. | ||
[[route]] | ||
route = "/text/" | ||
workers = 1 | ||
server_type = "Shiny" | ||
app_dir = "./text" | ||
|
||
# By default the `workdir` and `app_dir` | ||
# is `.` (Here). If we don't specify | ||
# it runs the app in the current dir. | ||
[[route]] | ||
route = "/" | ||
workers = 1 | ||
server_type = "Shiny" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
shiny::runExample("05_sliders") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shiny::runExample("02_text") |