# Database connectivity inside a node

**URL:** <https://discourse.nodered.org/t/database-connectivity-inside-a-node/14731>\
**Category:** Developing Nodes\
**Created:** [24 August 2019 06:06 UTC](https://discourse.nodered.org/t/database-connectivity-inside-a-node/14731 "2019-08-24T06:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanketp](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Sanketp](https://discourse.nodered.org/u/Sanketp)\
**Post date:** [24 August 2019 06:06 UTC](https://discourse.nodered.org/t/database-connectivity-inside-a-node/14731/1 "2019-08-24T06:06:03Z")

</div>

I created a node which has two fields name and password and i want to save this details inside the mongo but i dont want to use the in built mongodb connection node.

---

<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:** [24 August 2019 06:37 UTC](https://discourse.nodered.org/t/database-connectivity-inside-a-node/14731/2 "2019-08-24T06:37:37Z")

</div>

There is no in built mongo node. The node configuration is stored on the flow file and the credentials should be stored in the credentials file if coded correctly.. The storage for these is pluggable but as far as I know there is not (yet) a mongo option.

---

<div class="post-metadata">

**Author:** ![Sanketp](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@Sanketp](https://discourse.nodered.org/u/Sanketp)\
**Post date:** [24 August 2019 06:43 UTC](https://discourse.nodered.org/t/database-connectivity-inside-a-node/14731/3 "2019-08-24T06:43:21Z")

</div>

@dceejay can i write mongo connectivity code inside .js file

---

<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:** [24 August 2019 06:58 UTC](https://discourse.nodered.org/t/database-connectivity-inside-a-node/14731/4 "2019-08-24T06:58:52Z")

</div>

If you want to, yes.
