Chat about current Lua tools and IDEs

User avatar
By Godzil
#69760 Hi everyone!

A couple of days ago I was looking for a simple way to use NodeMCU without the need to use all of the computer based tool like ESPresso, especially when you are not on your main computer or don't want to install specific tools to upload files to your ESP and just to make some rapid test/demo on your ESP8266.

I found moononournation WebIDE, but it is quite old, installation is a bit painful as the binary distribution is based on a really old NodeMCU.

I decided to make a fork of it and clean as much as possible the repository and have at first a version which is identically working as the moononournation's current version, but on a recent NodeMCU.

The major changes I've made is:
- remove the binary distribution as it get's old really quickly, and you may want modules which are *not* provided in the binary distribution
- remove the copy of httpserver and use the vanilla version from httpserver repository, apply really small patch as needed during build of WebIDE
- Add a makefile, inspired by httpserver's one to painlessly upload the patched httpserver and webide to your ESP8266
- also add as submodule the python uploader, and it automatically create a python virtual env with dependencies.

It may not work as is under Windows, but works fine under Linux/Mac OS X, for windows you would probably need a Unix emulation environment like Cygwin, or "bash.exe" but on the latter you don't have access to your real serial port, so uploading is not possible as is.

Also, the makefile works fine for me on multiple environments I use (different Linux and Mac OS X) but it may fail for you, please report any issue you have with it.

You can find it here:
https://github.com/Godzil/nodemcu-webide

I would love to see this project lively, so please any comments are welcome :)
Whatever the type of comment: request for feaures, says how bad it is, thanks, etc..

My next step for the project are to:
- Try to update CodeMirror to the latest version. This is the html/js tool used for the code editor, the version currently in use is more than a year old
- See which CoreMirror plugins would be nice to have
- Try to add some CodeMirror themes (2 or 3 would be nice, at least a light and dark one)
- Make the HTML interface more polished
- Add a Wifi configuration tool, I will discuss with the author of httpserver about that, I have an idea, but I don't know if he would accept to integrate it into httpserver

How to install:
- Build and install a NodeMCU with the required modules (see the Readme file) and the one your need
- make a copy (either release or from git) of the project on your computer
- in command line:
Code: Select all$ cd /path/to/nodemcu-webide
$ make prepare


Now edit the httpserver/httpserver-conf.lua with your wanted settings

Back on the command line:
Code: Select all$ make upload_server
$ make upload_webide


- Open your standard serial terminal, reset your board and check that everything goes fine, and voila it is installed!

I hope you will enjoy using that tool!