diff --git a/R/ambhtmx.R b/R/ambhtmx.R index 54a43d7..a3b9ac9 100644 --- a/R/ambhtmx.R +++ b/R/ambhtmx.R @@ -21,8 +21,8 @@ ambhtmx_app <- \( print("Set AMBHTMX_PROTOCOL, AMBHTMX_HOST and AMBHTMX_PORT environment variables to configure the server. By default, http://127.0.0.1:8000 is set.") } protocol <- protocol %||% Sys.getenv("AMBHTMX_PROTOCOL") %||% "http" - port <- port %||% Sys.getenv("AMBHTMX_HOST") %||% "127.0.0.1" - host <- host %||% Sys.getenv("AMBHTMX_PORT") %||% "8000" + port <- port %||% Sys.getenv("AMBHTMX_PORT") %||% "8000" + host <- host %||% Sys.getenv("AMBHTMX_HOST") %||% "127.0.0.1" if (live != "") { warning("live = TRUE is alpha") cat(glue::glue("\nRun on the terminal for hot reloading:\nnpx nodemon --signal SIGTERM {live}\n\n\n")) diff --git a/inst/examples/06-basic-auth.R b/inst/examples/06-basic-auth.R index cc07781..041c63c 100644 --- a/inst/examples/06-basic-auth.R +++ b/inst/examples/06-basic-auth.R @@ -18,7 +18,6 @@ c(app, context, operations) %<-% ambhtmx_app( live = live_path ) - #' Authentication feature with secret cookies and .Renviron variables app$get("/login", \(req, res) { process_login_get(req, res) @@ -87,3 +86,4 @@ app$post("/increment", \(req, res){ #' Start the app with all the previous defined routes app$start(open = FALSE) +