Using Espruino with Node.js

Posted on
  • With no experience in Python or C++, I thought about giving Espruino a try as I'm more experienced in JavaScript and Node.js. But I just wanted to hear with you guys if it's even possible to run a Node.js app on the Espruino?

  • Hi,

    I think it depends on what sort of thing you mean. If it's a single file Node.js script then yes, it'll probably be ok. However if you're using a bunch of external modules then probably not - since by themselves they will use up more memory than is available in the microcontroller.

    Basically if you're hoping to take exactly the same code that runs on a PC with 8GB of RAM and run it on a microcontroller with 0.000064GB RAM then you'll probably be disappointed, but if you're willing to make a few small changes then you can still use a bunch of the Node.js stuff you're used to - Promises, arrow functions, regex/etc and get them running on a microcontroller.

    I'd definitely recommend you start off trying to write your first bits of code for Espruino from scratch though. If you start off trying to port something before you've got a feel for it you may hit issues.

    If you want to have a quick play it might be worth checking out the Bangle.js emulator: https://www.espruino.com/ide/emulator.ht­ml

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Using Espruino with Node.js

Posted by Avatar for user118601 @user118601

Actions