node-red / cookbook.nodered.org

Node-RED Cookbook
http://cookbook.nodered.org
Apache License 2.0
84 stars 34 forks source link

Feedback on 'Create an HTTP Endpoint' #70

Closed jim-moyse closed 4 years ago

jim-moyse commented 4 years ago

I am attempting to learn how to use Node Red for a project that I am working on. I have installed Node Red on my workstation it appears to be working correctly. Opening Node-red @ 127.0.0.1:1880.

Using the Node Red Cookbook as a tutorial, I am trying to generate an interactive web page. Starting with HTTP endpoints, I follow the instructions, get a HTTP In node, a Template node, HTTP Response node and wire them together. I add the HTML code to the Template node.

What address do I put in the browser to see "Hello World"? 127.0.0.1:1880/???

I am missing how to view the response and need this most basic step to move on.

Thanks,

Jim

mblackstock commented 4 years ago

At the bottom of the page in the discussion section, it suggests using curl to access the endpoint http://localhost:1880/hello. You would point the browser to that.

If you have turned on http authentication then you may need add your userid and password to the curl command. e.g.

[~]$ curl -u userid:password  http://localhost:1880/hello 
jim-moyse commented 4 years ago

Thanks. It makes sense now.


From: Mike Blackstock notifications@github.com Sent: Wednesday, January 15, 2020 12:00 PM To: node-red/cookbook.nodered.org cookbook.nodered.org@noreply.github.com Cc: Jim jm27432@hotmail.com; Author author@noreply.github.com Subject: Re: [node-red/cookbook.nodered.org] Feedback on 'Create an HTTP Endpoint' (#70)

At the bottom of the page in the discussion section, it suggests using curl to access the endpoint http://localhost:1880/hello. You would point the browser to that.

If you have turned on http authentication then you may need add your userid and password to the curl command. e.g.

[~]$ curl -u userid:password http://localhost:1880/hello

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnode-red%2Fcookbook.nodered.org%2Fissues%2F70%3Femail_source%3Dnotifications%26email_token%3DAJE3XZJBQ4LK4QYTUMWN3ULQ546LDA5CNFSM4KG6LEX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJBBCLI%23issuecomment-574755117&data=02%7C01%7C%7C94efdc828fbf44bf866e08d799dc6fdf%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637147044356095587&sdata=iFSYmOxGD7kMg3pT%2FfhkgP%2FDVH3tjVgKryqUbHyvdYU%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJE3XZP4YFRWTHMUZVB23NTQ546LDANCNFSM4KG6LEXQ&data=02%7C01%7C%7C94efdc828fbf44bf866e08d799dc6fdf%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637147044356105592&sdata=AAZkSNREkxkO7fwwRL4B9kV5i9b%2FKhG733UCncGpsRY%3D&reserved=0.