Run a processing sketch on a rpi as webserver

Hello,

I made a GUI in processing some time ago. The application itself can be used to draw a schematic for a modelrailway. This schematic is stored and loaded to and from CSV files.


I know very little about modern webserver stuff.

I would like this sketch to run on a raspberry pi as a web server. I want to be able to use any computer with any webbrowser to interact with the application as a client.

Besides storing a layout on a CSV file, the content also needs to be sent via a serial port to an arduino board. As a standalone executable this all works fine, but now I want to use a client pc.

I have read a little about javascript. But this is mostly new to me. I do C, C++, python and a bit java, but that’s about it…

I do have some experience with running a server with a processing sketch. (with an wemos D1 mini as client) :grinning:

I tested the example and firefox could open and ‘play’ the .html file on my PC.

But how do I host that .html file as a webserver? Before I use the raspberry I would like to host this .html on my windows 10 PC. I can than use my smartphone or other PC with a browser to test.

Can I for instance make a webserver with a processing sketch and copy/paste the content of that html file inside that sketch?

Obviously my own application exists out of many .pde files. How exactly do I stuff that in a .html file?

Any pointers would be appreciated,

Bas

Hello @bask185,

This may be of interest:

:)