# Hooking into Node-Red deploy

**URL:** https://discourse.nodered.org/t/hooking-into-node-red-deploy/16592
**Category:** General
**Created:** [11 October 2019 08:29 UTC](https://discourse.nodered.org/t/hooking-into-node-red-deploy/16592 "2019-10-11T08:29:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Michiel](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Michiel](https://discourse.nodered.org/u/Michiel)
#### Post date: [11 October 2019 08:29 UTC](https://discourse.nodered.org/t/hooking-into-node-red-deploy/16592/1 "2019-10-11T08:29:25Z")

</div>

Hello,  
I hope I've got the right cattegory for this.

We've got a product where we use Node-Red for programming it.  
Now the storage of this device is read-only by design. So naturally when I press deploy in Node-Red it gives me an error that it can't save. This is not a really big issue: I just make it read-write temporarily and voila.

But what I would really want is some kind of way to hook into the the deploy button in some kind of way.  
I'd imagine a "pre\_deploy" and "post\_deploy" function I could, for example, plug into settings.js. In there I could set my device read-write in the pre, and read-only in the post.

Is there a way to make this happen? I haven't really found anything yet coming close to this particular issue.

---

<div class="post-metadata">

### Author: ![Michiel](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Michiel](https://discourse.nodered.org/u/Michiel)
#### Post date: [11 October 2019 14:35 UTC](https://discourse.nodered.org/t/hooking-into-node-red-deploy/16592/2 "2019-10-11T14:35:21Z")

</div>

For future google-searchers: at this moment this is not possible, but a kind user on Slack pointed me towards the Storage API: [https://nodered.org/docs/api/storage/](https://nodered.org/docs/api/storage/)

Personally I'm using this to achieve what I want.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [11 October 2019 15:12 UTC](https://discourse.nodered.org/t/hooking-into-node-red-deploy/16592/3 "2019-10-11T15:12:23Z")

</div>

> [@Michiel](#):
>
> a kind user

Otherwise known as the key developer... @knolleary
