How to debug RestRserve
, browser()
?
#204
-
Hello I'm getting started with I see the warnings about running in interactive mode and I know I tried this which gives this error: main.R #!/usr/bin/env Rscript
box::use(RestRserve)
app <- RestRserve$Application$new()
app$add_get("/echo", function(.req, .res) {
browser() # breaks the app in interactive mode
.res$set_body(list(paste0("The message is: '", .req$get_param_query("msg"), "'")))
.res$set_content_type("application/json")
})
backend <- RestRserve$BackendRserve$new()
backend$start(app, http_port = 8080) It runs but when I visit the end point I get this error:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm sorry - I haven't seen activity in Discussions. For whatever reason I'm not getting any notifications from github. |
Beta Was this translation helpful? Give feedback.
I'm sorry - I haven't seen activity in Discussions. For whatever reason I'm not getting any notifications from github.
To debug I suggest to not start application with
backend$start()
but useapp$process_request()
- see here.