Hi, I'm a hardware guy by training and experience so I'm pretty much a newb
when it comes to this.
I'm am using node-red on a BBB trying to service a http request and return
a simple web page. Right now I'm trying to use an example flow from
node-red and it doesn't seem to be working.
I'm not sure how to format the Get request argument among other things. I
also am not sure how to debug this other than visiting the URL with a
chrome or firefox browser page.
Has anyone else done this? Does anyone have a flow that's known to work on
the BBB rev C?
Running:
Debian 9.5
BoneScript 0.7.0.
node-red v0.19.4
Here's the JSON flow:
[{"id":"4f655344.2681d4","type":"http
in","z":"fb76d89e.04292","name":"","url":"http://192.168.1.14/Home_Page","method":"get","upload":false,"swaggerDoc":"","x":412,"y":1077,"wires":[["c8f49eb2.d36408"]]},{"id":"a4cff941.69703","type":"http
response","z":"fb76d89e.04292","name":"","statusCode":"","headers":{},"x":1058,"y":1087,"wires":[]},{"id":"c8f49eb2.d36408","type":"template","z":"fb76d89e.04292","name":"","field":"payload","fieldType":"msg","syntax":"mustache","template":"<!DOCTYPE
html> \n<html>\n<head>\n\t<title>Page Title</title>\n\t<meta
name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<link
rel=\"stylesheet\"
href=\"http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css\"
/>\n<script
src=\"http://code.jquery.com/jquery-1.9.1.min.js\"></script>\n<script
src=\"http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js\"></script>\n</head>\n\n<body>\n<!--
Start of first page: #one -->\n<div data-role=\"page\"
id=\"one\">\n\n\t<div
data-role=\"header\">\n\t\t<h1>Multi-page</h1>\n\t</div><!-- /header
-->\n\n\t<div role=\"main\" class=\"ui-content\"
>\n\t\t<h2>One</h2>\n\n\t\t<p>I have an <code>id</code> of \"one\" on my
page container. I'm first in the source order so I'm shown when the page
loads.</p>\n\n\t\t<p>This is a multi-page boilerplate template that you can
copy to build your first jQuery Mobile page. This template contains
multiple \"page\" containers inside, unlike a single page template that has
just one page within it.</p>\n\t\t<p>Just view the source and copy the code
to get started. All the CSS and JS is linked to the jQuery CDN versions so
this is super easy to set up. Remember to include a meta viewport tag in
the head to set the zoom level.</p>\n\t\t<p>You link to internal pages by
referring to the <code>id</code> of the page you want to show. For example,
to <a href=\"#two\" >link</a> to the page with an <code>id</code> of
\"two\", my link would have a <code>href=\"#two\"</code> in the
code.</p>\n\n\t\t<h3>Show internal pages:</h3>\n\t\t<p><a href=\"#two\"
class=\"ui-btn ui-shadow ui-corner-all\">Show page
\"two\"</a></p>\n\t\t<p><a href=\"#popup\" class=\"ui-btn ui-shadow
ui-corner-all\" data-rel=\"dialog\" data-transition=\"pop\">Show page
\"popup\" (as a dialog)</a></p>\n\t</div><!-- /content -->\n\n\t<div
data-role=\"footer\" data-theme=\"a\">\n\t\t<h4>Page
Footer</h4>\n\t</div><!-- /footer -->\n</div><!-- /page one -->\n\n<!--
Start of second page: #two -->\n<div data-role=\"page\" id=\"two\"
data-theme=\"a\">\n\n\t<div
data-role=\"header\">\n\t\t<h1>Two</h1>\n\t</div><!-- /header -->\n\n\t<div
role=\"main\" class=\"ui-content\">\n\t\t<h2>Two</h2>\n\t\t<p>I have an id
of \"two\" on my page container. I'm the second page container in this
multi-page template.</p>\n\t\t<p>Notice that the theme is different for
this page because we've added a few <code>data-theme</code> swatch
assigments here to show off how flexible it is. You can add any content or
widget to these pages, but we're keeping these simple.</p>\n\t\t<p><a
href=\"#one\" data-direction=\"reverse\" class=\"ui-btn ui-shadow
ui-corner-all ui-btn-b\">Back to page \"one\"</a></p>\n\n\t</div><!--
/content -->\n\n\t<div data-role=\"footer\">\n\t\t<h4>Page
Footer</h4>\n\t</div><!-- /footer -->\n</div><!-- /page two -->\n\n<!--
Start of third page: #popup -->\n<div data-role=\"page\"
id=\"popup\">\n\n\t<div data-role=\"header\"
data-theme=\"b\">\n\t\t<h1>Dialog</h1>\n\t</div><!-- /header -->\n\n\t<div
role=\"main\" class=\"ui-content\">\n\t\t<h2>Popup</h2>\n\t\t<p>I have an
id of \"popup\" on my page container and only look like a dialog because
the link to me had a <code>data-rel=\"dialog\"</code> attribute which gives
me this inset look and a <code>data-transition=\"pop\"</code> attribute to
change the transition to pop. Without this, I'd be styled as a normal
page.</p>\n\t\t<p><a href=\"#one\" data-rel=\"back\" class=\"ui-btn
ui-shadow ui-corner-all ui-btn-inline ui-icon-back ui-btn-icon-left\">Back
to page \"one\"</a></p>\n\t</div><!-- /content -->\n\n\t<div
data-role=\"footer\">\n\t\t<h4>Page Footer</h4>\n\t</div><!-- /footer
-->\n</div><!-- /page popup
-->\n</body>\n\n\n\n\n\n</html>","x":816,"y":1079,"wires":[["a4cff941.69703","63f4fa6b.896cbc"]]},{"id":"63f4fa6b.896cbc","type":"debug","z":"fb76d89e.04292","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1037,"y":998,"wires":[]}]
Thanks!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/b2bec104-7a59-43a4-8fc2-c561cad5a0f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.