Using frameworks such as Vue or Node for web development on esp32

zazas321
Posts: 231
Joined: Mon Feb 01, 2021 9:41 am

Using frameworks such as Vue or Node for web development on esp32

Postby zazas321 » Wed Feb 14, 2024 1:07 pm

Hey. We have an ESP32 running a webserver (both in AP and station mode is supported). On the ESP32 we currently have index.html, scripts.js and styles.css that are stored in the flash memory.

Our webserver is scaling up quite rapidly, we are constantly adding more and more functions and it has become quite hard to maintain our webpage. Our .html itself is more than 15000 lines of code...


We were wondering if there is a possibiity to rewrite everything to frameworks such as Vue or Node js. Is that even possible on the ESP32 due to memory constraints? How would it work if the ESP32 is in AP mode? Does it need to download some additional modules for Vue or Node to display the UI, how to embed everything inside ESP32?

I would appreciate any clarifications. Thanks in advance :)

MicroController
Posts: 1727
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Using frameworks such as Vue or Node for web development on esp32

Postby MicroController » Wed Feb 14, 2024 7:22 pm

Vue shouldn't be a problem at all. Check out the RESTful server example.

crwhite57
Posts: 6
Joined: Tue Apr 13, 2021 5:29 pm

Re: Using frameworks such as Vue or Node for web development on esp32

Postby crwhite57 » Tue Oct 08, 2024 4:50 pm

It sounds like you're having some discomfort with your ESP32 web server. While frameworks like Vue or Node.js can enhance your project, the ESP32 has limited resources, so running an entire Node.js server might not be feasible due to its memory constraints.
However, you can consider using Vue.js for the front end. It can help modularize your code and make it easier to maintain. You would host your Vue files on the ESP32, but remember you might need to compile them into plain HTML, CSS, and JavaScript to serve them effectively. When the ESP32 is in AP mode, users can connect directly to it, and it can serve the Vue app just like any static files. Just ensure you optimize your assets to keep memory usage in check.
Contextual advertising can be a smart move if you're looking for more tools to enhance your online presence. You can check out more there.

Who is online

Users browsing this forum: No registered users and 115 guests