# Connect function to node without direct wire

**URL:** <https://discourse.nodered.org/t/connect-function-to-node-without-direct-wire/19377>\
**Category:** General\
**Created:** [20 December 2019 09:19 UTC](https://discourse.nodered.org/t/connect-function-to-node-without-direct-wire/19377 "2019-12-20T09:19:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meng](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Meng](https://discourse.nodered.org/u/Meng)\
**Post date:** [20 December 2019 09:19 UTC](https://discourse.nodered.org/t/connect-function-to-node-without-direct-wire/19377/1 "2019-12-20T09:19:28Z")

</div>

I am writing some code using require and functionGlobalContext. This includes a self-invoking functions for checking if a database exists or must be created. Normally I access the DB via a MySQL node, however I now do not have a node to connect to the MySQL node. Is there a way to make a connection to a node, via a function, without using the wire directly from the function node or is there a way to call a node inside a function?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 December 2019 09:49 UTC](https://discourse.nodered.org/t/connect-function-to-node-without-direct-wire/19377/2 "2019-12-20T09:49:32Z")

</div>

No - the whole point of Node-RED is that you can see what is calling what by the fact that they are wired together.  
(OK so yes you can probably hack it - but you may as well just write lines of node code and not use Node-RED)
