I am trying to connect Apple homekit to nodemcu board, I found a tutorial which works on my computer, but I am wonder if there is any way to load and run Node.JS on a NodeMCU board (ESP8266)?
The usual way to run a Node. js program is to run the globally available node command (once you install Node. js) and pass the name of the file you want to execute. While running the command, make sure you are in the same directory which contains the app.
We want our ESP8266 board to connect to our internal network automatically. Fortunately, with a few lines of JavaScript in the console we can configure it and store these settings in flash memory.
You can run Espruino on it. I have the HiLetgo NodeMCU ESP-12E Module and was easily able to load the firmware.
Some samples to try out
https://github.com/mertenats/NodeMCU-and-JavaScript
I think you're confusing nodemcu, which is a firmware for the ESP8266 boards that interprets the language lua, with the javascript runtime node.js, which runs on computers.
So, the answer is you cannot run node.js on an ESP8266.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With