# Access storage Module in Custom Node

**URL:** <https://discourse.nodered.org/t/access-storage-module-in-custom-node/79142>\
**Category:** Developing Nodes\
**Created:** [12 June 2023 09:37 UTC](https://discourse.nodered.org/t/access-storage-module-in-custom-node/79142 "2023-06-12T09:37:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KilianHertel](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@KilianHertel](https://discourse.nodered.org/u/KilianHertel)\
**Post date:** [12 June 2023 09:37 UTC](https://discourse.nodered.org/t/access-storage-module-in-custom-node/79142/1 "2023-06-12T09:37:11Z")

</div>

Hi,

is it possible to access functions from a custom storageModule I provided in a customNode?

So lets say if I have a websocket Connection already open in my storage module could i use that same connection in a custom node.

I just would need like a pipe through of the storageModule-Object from the settingsFile to the custom node editor.

Regards

Kilian Hertel

---

<div class="post-metadata">

**Author:** ![KilianHertel](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@KilianHertel](https://discourse.nodered.org/u/KilianHertel)\
**Post date:** [13 June 2023 12:43 UTC](https://discourse.nodered.org/t/access-storage-module-in-custom-node/79142/2 "2023-06-13T12:43:10Z")

</div>

So. I did find a solution. You can make a package out of your storage module and then import that in your custom node. I didn't know nodejs persists once loaded packages you require multiple times. Then just require the storage class in the custom node and it works.

---

<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:** [27 June 2023 12:43 UTC](https://discourse.nodered.org/t/access-storage-module-in-custom-node/79142/3 "2023-06-27T12:43:33Z")

</div>

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