Upload mjs code and reboot


I’m migrating from old Web IDE which had a upload files to device and reboot.
How do I do this using VSCODE ?

ie I assume I don’t need to rebuild code if I am just updating logic in iniit.js ?


Continuing the discussion from Upload mjs code and reboot:

Hi, I had to work this out myself as the mongoose os docs are very poor and also the docs on GitHub

Add the mongoose extension to vscode

Open your App1 folder created by mom tool. (you need to build code and flash to device first)

Have your device connected to USB port (I am on a Mac)

Close (exit) mos tool web ui, you don’t need it for the rest

Once App1 (or what ever you called it) is open, and device is connect, vscode will open mongoose extension under folder of App1 (project).

I am going to uninstall and re-install it all so I get instructions right for you, but I have it working, can change js files etc, save to device and then reboot device for the changes to take affect. Be patient, I will get back to you


thanks, it would be good if the Cesanta could update the VScode add-on to include this function…


You’re free to do so by yourself or maybe in the community someone might help in this matter. It’s open source and free, so this is like it’s handled normally. (Just to be clear: I’m not related to Cesanta in any way whatsoever).


ok it looks like I can do the following:

send the following commands:
put D:\source\mongooseOS\hotwater-temperature\fs\init.js init.js
call sys.reboot

a but clunky but it seems to work is there a way in vscode to make this a shortcut or menu item?