Skip to main content

One post tagged with "python"

View All Tags

ยท 10 min read
Dominik Nowak

In this article I present how to host a web app on your Raspberry Pi (or other computers) with a couple of interesting features.

  • โ›” no static IP address, Dynamic DNS or port forwarding on your router needed
  • ๐Ÿš€ low latency access over the public Internet without server in the middle
  • ๐Ÿ” possibility to easily share access to that web app only to specific people

The web app will consist of two elements:

  • โœ๏ธ front-end: using Bootstrap 4 and websocket client written in JS
  • โœ๏ธ back-end: Python app with a websocket server providing a JSON API to the front-end part

I show a bi-directional connection over a single websocket. The demo application will be very simple - controlling a LED connected to Raspberry Pi using a button in web UI and controlling an indicator in the web UI over the button connected to Raspberry Pi.

๐Ÿ’ญ You can treat this app as a boilerplate code for your own, more sophisticated apps requiring a low-latency control over a web user interface.

Python backend and Bootstrap 4 front-end hosted on Raspberry Pi with remote access over the Internet