wybiral / micropython-aioweb

A minimalist asyncio web framework for MicroPython.
MIT License
29 stars 14 forks source link

I got the esp-fs-webserver working using aioweb #1

Open aguaviva opened 1 year ago

aguaviva commented 1 year ago

I made work the https://github.com/cotestatnt/esp-fs-webserver using your framework. Would you be interested in this code?

Also I'd like to have this functionality in a different file so it is in its own module, that way it doesn't clutter the main code and I can easily disable it. What would be the best way to do this?

BTW big thanks! This is the best web server for the esp8266 by far and every project out there should use it!

rkompass commented 1 year ago

Hello @aguaviva,

is your port of the esp-fs-webserver the pull request that you made here? I'm very interested in it. If it would work it would be a big achievement. Did you continue your work on it? How did you come to find that micropython-aioweb is the best web server? Which ones did you try out / compare to?

I'm currently exploring network functionality on the Winner w600. This port has increased it's capabilities immensely in the last weeks (heap memory is now at > 100K for example, webrepl is functional,....). It is similar to the 8266 in many respects (WIFI on one core, FreeRTOS). I'm searching for the optimal webserver for it, that allows to be used asynchronously, so that some robot-controlling stuff can be running in parallel without using threads.

rkompass commented 1 year ago

Got your pull request running. I can edit .htm files now, and after making slight changes in edit, also .py files. Impressing stuff, server is running quite solidly. I will study it's code thoroughly.

aguaviva commented 1 year ago

Awesome, it is ages I don't touch that code, good to know it is helping :)

rkompass commented 1 year ago

Not even a year, actually. I was as enthusiastic now as you then, it seems. Great looking website and impressing functionality! It ran quite solidly for half a day here, until I shut it down.

A number of questions appeared: First I saw I cannot edit python files. That I was able to enable by slight changes in edit.htm. Now such edit is possible, but there is no syntax highlighting. In your pull request you have mode-html.js.gz and mode-json.js.gz in subdirectory edit. Seems to me that these two are taken for editing in syntax-highlighting modes. As the ace.js is taken preferrably from cloudflare, isn't that possible with the above (and more) syntax files as well? I might add a mode-python.js.gz. Didn't try that so far.

More thoughts (no need to answer, but your comments are appreciated, of course)


aguaviva commented 1 year ago

I just made a small contribution by merging two existing projects: 1- one is this webserver 2- https://github.com/cotestatnt/esp-fs-webserver

but I am glad it helped you and that you are thinking about making some improvements, that is the spirit of OS :)

rkompass commented 1 year ago

Exactly, thank you.

palmtreefrb commented 1 year ago

I'm a little confused. How is this micropython project being used in - https://github.com/cotestatnt/esp-fs-webserver?

rkompass commented 1 year ago

https://github.com/cotestatnt/esp-fs-webserver is a project mainly of javascript.

There is the ACE web editor and the file browser (both written in javascript, available as pre-build libraries, minimized and gzipped) and a nice gui html page. What was needed is glueing this together - both need info of the file system, and the file contents and send commands for file changes and creation/deletion etc.. This was provided to the HTML/Javascript originally via a lot of server handler code and is now provided by this Micropython aioweb via websocket.

aguaviva commented 12 months ago

Any updates on integrating my code as a sample?