# Node.js on ESP8266

**URL:** <https://discourse.nodered.org/t/node-js-on-esp8266/54216>\
**Category:** General\
**Created:** [24 November 2021 15:59 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216 "2021-11-24T15:59:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [24 November 2021 15:59 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/1 "2021-11-24T15:59:14Z")

</div>

re: Node.js installation on an ESP8266 using ESPruino.

If I were to use Node-RED to develop a flow intended for the ESP8266, would it be possible to simply load the JSON file to the ESP8266 and it would perform the same function as in Node-RED?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 November 2021 16:18 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/2 "2021-11-24T16:18:19Z")

</div>

No, that is not possible today.

Espruino is a JavaScript runtime. It implements the core JavaScript language for the ESP device.

Node.js is a runtime that includes a large number of additional libraries that are _not_ part of the JavaScript language specification. So you cannot take a node.js application and run it on ESPruino.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [24 November 2021 16:24 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/3 "2021-11-24T16:24:24Z")

</div>

Thanks, I was afraid it wouldn't be that simple, knowing the extra baggage that Node-RED requires.  
It certainly would be extremely useful if an App could be developed that would format the JSON so it could be loaded to an ESP8266; that would make Node-RED an IDE.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 November 2021 16:31 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/4 "2021-11-24T16:31:09Z")

</div>

> [@xytsrm](#):
>
> It certainly would be extremely useful if an App could be developed that would format the JSON so it could be loaded to an ESP8266; that would make Node-RED an IDE.

Yup, an espruino compatible runtime has been on my list of interesting side projects to tackle for a long time. It wouldn't be a full Node-RED runtime - the palette of nodes would be very limited and specific to the ESP, but it would be fun to do.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [24 November 2021 16:57 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/5 "2021-11-24T16:57:32Z")

</div>

I certainly appreciate the requirement for a limited palette given the limitations of the ESP8266 platform. However, I'm sure you would agree that the including MQTT node would be of significant importance.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 November 2021 17:08 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/6 "2021-11-24T17:08:17Z")

</div>

It's pretty academic discussion because it's unlikely to be something I have the bandwidth to do anything with.

So yes, I'm sure there are plenty of 'must have' nodes. The real challenge is keeping the footprint small enough to fit. That will always be the downside of using an interpreted rather than compiled language - you have the overhead of the language runtime to consider.

---

<div class="post-metadata">

**Author:** ![xytsrm](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xytsrm](https://discourse.nodered.org/u/xytsrm)\
**Post date:** [24 November 2021 20:52 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/7 "2021-11-24T20:52:12Z")

</div>

I quite agree on Interpreted vs Compiled; one of the reasons I liked Visual Basic (VB6 now legacy) is that it had both.

---

<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:** [23 January 2022 20:52 UTC](https://discourse.nodered.org/t/node-js-on-esp8266/54216/8 "2022-01-23T20:52:27Z")

</div>

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