# Generate flow from code

**URL:** https://discourse.nodered.org/t/generate-flow-from-code/51787
**Category:** Developing Nodes
**Created:** [3 October 2021 02:59 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787 "2021-10-03T02:59:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![p1swk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/p1swk/32/48919_2.png) [@p1swk](https://discourse.nodered.org/u/p1swk)
#### Post date: [3 October 2021 02:59 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787/1 "2021-10-03T02:59:52Z")

</div>

Node-RED creates code from a flow. Is there a way to generate flow from code? This would help me convert a teensy 3.1 routine to tennsy 4.0

---

<div class="post-metadata">

### Author: ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)
#### Post date: [3 October 2021 06:25 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787/2 "2021-10-03T06:25:05Z")

</div>

> [@p1swk](#):
>
> Node-RED creates code from a flow

Not as I understand it... Node-Red used JavaScript, and JavaScript is an interpreted, not compiled, language. So it basically runs through the code, that makes up each node, as it is needed.

> [@p1swk](#):
>
> This would help me convert a teensy 3.1 routine to tennsy 4.0

More explanation on what you are saying might be needed here as the Teensy generally runs C++ not JavaScript.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [3 October 2021 17:51 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787/3 "2021-10-03T17:51:34Z")

</div>

> [@p1swk](#):
>
> Node-RED creates code from a flow

Node red doesn't create code at all, node red _is_ code.

I don't see how node red is related to the teensey boards at all.

---

<div class="post-metadata">

### Author: ![machadotiago](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/machadotiago/32/23776_2.png) [@machadotiago](https://discourse.nodered.org/u/machadotiago)
#### Post date: [3 October 2021 23:15 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787/4 "2021-10-03T23:15:54Z")

</div>

Not sure if I understood your question, but in my understanding you want to generate a flow automatically. This for sure can be done, since a flow is basically a json file so, all you have to do is to generate this json file from a different software.  
(btw, we do this for all our industrial applications)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [2 December 2021 23:16 UTC](https://discourse.nodered.org/t/generate-flow-from-code/51787/5 "2021-12-02T23:16:42Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
