# Source code of RED.nodes.createNode

**URL:** <https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787>\
**Category:** Core Development\
**Created:** [1 July 2019 14:53 UTC](https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787 "2019-07-01T14:53:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![natrayanp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/natrayanp/32/9861_2.png) [@natrayanp](https://discourse.nodered.org/u/natrayanp)\
**Post date:** [1 July 2019 14:53 UTC](https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787/1 "2019-07-01T14:53:21Z")

</div>

Hi please help me to point to the source code of the class source code of RED.nodes. i would like to see createNode method.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 July 2019 15:06 UTC](https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787/2 "2019-07-01T15:06:33Z")

</div>

Hi,

you can see it (mostly) here: [https://github.com/node-red/node-red/blob/master/packages/node\_modules/%40node-red/runtime/lib/nodes/index.js](https://github.com/node-red/node-red/blob/master/packages/node_modules/%40node-red/runtime/lib/nodes/index.js)

Here is `createNode`: [https://github.com/node-red/node-red/blob/f49d1ae8602c618f2e2e3707f3353389a3dd7dd8/packages/node\_modules/%40node-red/runtime/lib/nodes/index.js#L94](https://github.com/node-red/node-red/blob/f49d1ae8602c618f2e2e3707f3353389a3dd7dd8/packages/node_modules/%40node-red/runtime/lib/nodes/index.js#L94)

Did you have a particular question about the code?

---

<div class="post-metadata">

**Author:** ![natrayanp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/natrayanp/32/9861_2.png) [@natrayanp](https://discourse.nodered.org/u/natrayanp)\
**Post date:** [4 July 2019 03:51 UTC](https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787/3 "2019-07-04T03:51:47Z")

</div>

Thank you knolleary. I didn't expect i will get such a detailed references.

I am looking for the code where the nodes are created based on the parameters (like, color, etc..)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 July 2019 05:31 UTC](https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787/4 "2019-07-04T05:31:12Z")

</div>

If you are interested in creating a node and how it all fits together, perhaps this will help rather than examining this?  
[https://nodered.org/docs/creating-nodes/first-node](https://nodered.org/docs/creating-nodes/first-node)

---

<div class="post-metadata">

**Author:** ![natrayanp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/natrayanp/32/9861_2.png) [@natrayanp](https://discourse.nodered.org/u/natrayanp)\
**Post date:** [22 July 2019 07:28 UTC](https://discourse.nodered.org/t/source-code-of-red-nodes-createnode/12787/5 "2019-07-22T07:28:41Z")

</div>

Actually i am interested to look at the code on how nodes are created and shown in UI based on the config. I am trying to do this in Angular so can take reference from this implementation. Please help me by pointing to the code
