# Options for simplifying custom node runtime code?

**URL:** https://discourse.nodered.org/t/options-for-simplifying-custom-node-runtime-code/84576
**Category:** Developing Nodes
**Created:** [13 January 2024 16:51 UTC](https://discourse.nodered.org/t/options-for-simplifying-custom-node-runtime-code/84576 "2024-01-13T16:51:42Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [15 January 2024 09:13 UTC](https://discourse.nodered.org/t/options-for-simplifying-custom-node-runtime-code/84576/7 "2024-01-15T09:13:35Z")

</div>

> [@Noisecraft - anyone heard of it?](https://discourse.nodered.org/t/noisecraft-anyone-heard-of-it/79813/110):
>
> > [@Noisecraft - anyone heard of it?](https://discourse.nodered.org/t/noisecraft-anyone-heard-of-it/79813/103):
> >
> > But if I could embody the runtime boilerplate in a class and then extend that for each node…
> 
> I’d be interested in seeing this once you have the time to share

Yes, well my initial attempt has ended badly. When you call `RED.nodes.registerType`, the 2nd argument is a function. I coudn't find a way to have that function in a class instance, each time I get an error.

When I get some time, I'll create a separate thread on the subject.

---

_[View the full topic](https://discourse.nodered.org/t/options-for-simplifying-custom-node-runtime-code/84576)._
