Closed dwbelliston closed 2 years ago
Oh, new to R. Forgot the import library(lambdr)
New file is
library(lambdr)
parity <- function(number) {
print(">>> in parity1")
result <- list(parity = if (as.integer(number) %% 2 == 0) "even" else "odd")
print(">>> in parity2")
as_stringified_json(
list(
isBase64Encoded = FALSE,
statusCode = 200L,
body = as_stringified_json(result)
)
)
}
lambdr::start_lambda()
Awesome! I'm glad you could get it working, and I hope that the package is useful.
Just testing trying to get this to work with API gateway, I see in the readme a reference to this function:
as_stringified_json
So i have add it in to the
runtime.R
fileI receive an error in lambda logs:
ERROR [2022-05-28 15:56:22] could not find function "as_stringified_json"
How am I suppose to include this?
Thanks!