title: How to run websocket server on mobile app
body: <p>I want two-way communication between a web app and a native app running on the same smartphone. I thought I could use websockets (is this a good idea?). But I would need to set up a websocket server in the app. Is this possible? Is there a cross-platform javascript-centric way to achieve this in both iOS and Android?</p>
  <p>I've looked at the <a href="https://github.com/websockets/ws" rel="nofollow noreferrer">https://github.com/websockets/ws</a> project. It states that it cannot set up a server in the browser, but could it work in a mobile app?</p>