You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However the [Dockerfile.heroku](Dockerfile.heroku) does not start the flow editor, the image is designed to run a set of flows, in this case (at time of writing) a simple website with a single page.
16
+
17
+
Basically this [flow](https://github.com/gorenje/erlang-red/blob/main/priv/testflows/flow.499288ab4007ac6a.json) is the [red-erik.org](https://red-erik.org) site.
18
+
19
+
The image does this by setting the following ENV variables:
20
+
21
+
-`COMPUTEFLOW`=`499288ab4007ac6a` - flow to be used. This can also be a comma separated list of flows that are all started.
22
+
-`DISABLE_FLOWEDITOR`=`YES` - any value will do, if set the flow editor is disabled.
23
+
24
+
Also be aware that Erlang-Red supports a `PORT` env variable to specifying the port upon which Cowboy will listen on for connections. The default is 8080.
25
+
26
+
Heroku uses this to specify the port to connect for a docker image so that its load balancer can get it right.
Copy file name to clipboardExpand all lines: README.md
+8-55Lines changed: 8 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,9 @@ These nodes can be installed using the corresponding Node-RED [node package](htt
192
192
193
193
An initial throw of the dice for Elixir support inside Erlang-Red. There is nothing special happening here other than Elixir code being compiled into the BEAM process and them modules being accessible using the 'Elixir.' prefix.
194
194
195
+
More substantial Elixir helpers can be added to [erlang-red-elixir-helpers](https://github.com/gorenje/erlang-red-elixir-helpers) repository.
196
+
197
+
195
198
### BEAM Processes
196
199
197
200
| Node | Comment | Example Flow |
@@ -220,16 +223,7 @@ These nodes can be installed using the corresponding Node-RED [node package](htt
220
223
- Contexts are **not supported**, so there is no setting things on `flow`, `node` or `global`.
221
224
-[JSONata](https://jsonata.org) has been **partially implemented** by the [Erlang JSONata Parser](https://github.com/gorenje/erlang-red-jsonata).
222
225
223
-
Elixir & Erlang-Red
224
-
---
225
-
226
-
Elixir helpers can be added to [erlang-red-elixir-helpers](https://github.com/gorenje/erlang-red-elixir-helpers) repository.
227
-
228
-
There is nothing stopping anyone from creating a complete node in Elixir provided there is a Erlang "node-wrapper", i.e., a bit of Erlang code in the [src/nodes](src/nodes) directory that references the Elixir node.
229
-
230
-
The initial example [markdown node](https://github.com/gorenje/erlang-red/blob/42f10112baac5a5f916ecd805eafc87382632dec/src/nodes/ered_node_markdown.erl#L38) is an Erlang node that references Elixir code. I also wrote an Elixir wrapper function whereby I could have just as easily referenced Earmark directly from the Erlang code. That was a stylist choice.
231
-
232
-
I intend to use Elixir code for importing Elixir libraries to the project and less coding nodes in Elixir. I simply prefer Erlang syntax. But each to their own :)
226
+
### Development
233
227
234
228
Build
235
229
-----
@@ -258,7 +252,7 @@ I use docker to develop this so for me, the following works:
However the [Dockerfile.heroku](Dockerfile.heroku) does not start the flow editor, the image is designed to run a set of flows, in this case (at time of writing) a simple website with a single page.
298
-
299
-
Basically this [flow](https://github.com/gorenje/erlang-red/blob/main/priv/testflows/flow.499288ab4007ac6a.json) is the [red-erik.org](https://red-erik.org) site.
300
-
301
-
The image does this by setting the following ENV variables:
302
-
303
-
-`COMPUTEFLOW`=`499288ab4007ac6a` - flow to be used. This can also be a comma separated list of flows that are all started.
304
-
-`DISABLE_FLOWEDITOR`=`YES` - any value will do, if set the flow editor is disabled.
305
-
306
-
Also be aware that Erlang-Red supports a `PORT` env variable to specifying the port upon which Cowboy will listen on for connections. The default is 8080.
307
-
308
-
Heroku uses this to specify the port to connect for a docker image so that its load balancer can get it right.
309
-
310
-
311
-
Example
312
-
---
313
-
314
-

315
-
316
-
What the gif shows is executing a [simple flow](https://flowhub.org/f/ea246f68766c8630) using Erlang as a backend. The flow demonstrates the difference in the switch node of 'check all' or 'stop at first match'.
317
-
318
-
All nodes are are processes - these are shown on the left in the terminal window.
319
-
320
-
This example is extremely trivial but it does lay the groundwork for expansion.
321
-
322
277
Testing
323
278
---
324
279
@@ -370,8 +325,7 @@ Contributions very much welcome in the form of Erlang code or as Node-RED test-f
370
325
371
326
Each test flow should test exactly one feature and use the assert nodes to check correctness of expected results. Tests can also be pending to indicate that the corresponding Erlang functionality is still missing.
372
327
373
-
374
-
Sibling Repos
328
+
Additional Repositories
375
329
---
376
330
377
331
An overview of the sibling projects for both the reader and me:
@@ -422,7 +376,6 @@ No Artificial Intelligence was harmed in the creation of this codebase. This cod
422
376
423
377
AI contributions can be made according to the rules defined in [.aiignore](.aiignore).
424
378
425
-
Coffee Time
426
-
----
379
+
---
427
380
428
-
<ahref="https://www.buymeacoffee.com/gorenje"target="_blank"><imgsrc="https://cdn.buymeacoffee.com/buttons/v2/default-red.png"alt="Buy Me A Tee"style="height: 42px!important;width: 152px!important;" ></a>
0 commit comments