# Best way to set up some context on boot

**URL:** https://discourse.nodered.org/t/best-way-to-set-up-some-context-on-boot/51507
**Category:** General
**Created:** [25 September 2021 11:32 UTC](https://discourse.nodered.org/t/best-way-to-set-up-some-context-on-boot/51507 "2021-09-25T11:32:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Calendil](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Calendil](https://discourse.nodered.org/u/Calendil)
#### Post date: [25 September 2021 11:32 UTC](https://discourse.nodered.org/t/best-way-to-set-up-some-context-on-boot/51507/1 "2021-09-25T11:32:01Z")

</div>

Hello all,  
I would like my set up some context at the beginning of a boot.  
[start-up-trigger] -----[change]  
Is this the best way to do it?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 September 2021 12:20 UTC](https://discourse.nodered.org/t/best-way-to-set-up-some-context-on-boot/51507/2 "2021-09-25T12:20:00Z")

</div>

Or if it is something that is fixed (so more like a global constant of some sort, maybe configuration information) then you can put it in functionGlobalContext in settings.js. Alternatively using environment variables might be more appropriate.

---

<div class="post-metadata">

### Author: ![Calendil](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Calendil](https://discourse.nodered.org/u/Calendil)
#### Post date: [25 September 2021 14:40 UTC](https://discourse.nodered.org/t/best-way-to-set-up-some-context-on-boot/51507/3 "2021-09-25T14:40:58Z")

</div>

Thank you!

---

<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: [24 November 2021 14:41 UTC](https://discourse.nodered.org/t/best-way-to-set-up-some-context-on-boot/51507/4 "2021-11-24T14:41:38Z")

</div>

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