How to create a websocket server in flutter? Or another technology?

I want to communicate in realtime between a local website and the flutter app without having a central server… In my opinion it is the best way to use a websocket server on the flutter app and connect to it via js, does anybody how to host one?

I’ve already googled very much, but I only found someone who said, that you should use tcp socket, but this wouldn’t work with js…