Skip to main content

the ngrok tunnel chatting websocket app (one society)

The ngrok tunnel , WS-chatting terminal app

--TECHS: *websocket *ngrok tunnel *fastapi *Tuı

  • The server : After create the ngrok tunnel ı set up as a server to raspberry pi3. And actually pi was not has a fan.

    Than i wrote a python script that watch the cpu degree and if its over heat the wall warning coming up the ssh devices.

-Then i just set up the project files to server.İt was okey but we was still has some problems that we dont need.

but ı will talk abaut that on problems part..

--PYTHON BACKEND: I use fast api and websocked with backend.The real time room system, To enter room you has to enter password username and the public url that ngrok tunnel give to you. When user exit he erase to list and sending a message another user that (user leave).The all rooms have maximum 2 user rules..

https://github.com/mercan798/Ngrok-Tunnel-WS/tree/main

--THE UI: I use a Tuı library to make it and i thing it was nice, not that complicated. The best part of uı, i try to

keep it simple and i thing its looking good at all. And the css ı will not making special space for css ı hate it its just a bunch of colors, i think i have to beat this habbit like i said the megagigawhat page but this is me and my book so i cant keep secrets.. I make this project for just me and my uncle.

--HOW WE ARE USE İT??: So to use it we have to set up all files to each computer and run the term.py , then a security wall will waiting for us and we give all infos. Like i said we have our ofices the server that keep ngrok tunnel and the project files, and the degree watcher.


--THE PROBLEMS WHİLE İ BUİLD THİS PROJECT:

  • The Type Mismatch: When ı develop this project, i set up rooms as rooms ={} right. But user data sometimes take over like a list. And the system was waiting dictionary ,but user method it was not suitable actually.

  • The solution: İ gave the user the user id. İt was become the dic alredy. For every websocket object creatunique id. Kind of working. I beat this problem like this. İt shows ı need to work on python fundamentals more :))

  • The 502 504 problems : The fast api was aint working for a while and never find out till i take a the problem Ngrok cant reach the backend problem. Then ı turn it on this was the soludition.

NOTE: The problems arent just them but, ı have try to share only higlight problems so , this is it

I wrote this code to myself and my uncle , i am glad if you check it out !! the ngrok tunnel chatting websocket app (one society)