Previously I tested the html str responded from worker, however, not inlining HTML within Rib. Things failed when inlining within a string interpolation, as indicated by discord user.
Rib
let style = "font-family: Arial, sans-serif; display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #1e3c72, #2a5298); color: #ffffff; text-align: center; padding: 20px;";
let user: u64 = request.path.user-id;
let body = "
<!DOCTYPE html>
<html>
<head>
</head>
<body style='${style}'>
<div>
<h1>Welcome to Golem Cloud!</h1>
<p style='font-size: 1.5em;'>Hello, User ID: ${user}</p>
<p style='color: #dcdcdc;'>Explore your cart contents and more on this personalized page.</p>
</div>
</body>
</html>"
{Content-Type: "text/html", status: 200u64, body: body}
Result
NOTE: Having a complex HTML within Rib within API Definition JSON is really hard. Everything has to be 1 line. Or else use golem-cloud console Rib editor.
In response to https://discord.com/channels/1134448700572319785/1134448701260169249/1300769907755061268
and tracked as part of https://github.com/golemcloud/golem/issues/1035 which is currently in progress
Previously I tested the html str responded from worker, however, not inlining HTML within Rib. Things failed when inlining within a string interpolation, as indicated by discord user.
Rib
Result
NOTE: Having a complex HTML within Rib within API Definition JSON is really hard. Everything has to be 1 line. Or else use golem-cloud console Rib editor.
https://github.com/afsalthaj/golem-worker-gateway-examples/blob/main/html/api-definition.json