Handling exposing of ports


I have an (electron) application that runs an internal Express server which provides data to the view layer via JSON endpoints. This all works fantastic, but is there any way to not expose Express’ port beyond the electron wrapper?

When I launch the app the Express service is accessible when accessing localhost from a web browser. While this could be awesome, it’s not exactly what I wanted and may present some issues… I was hoping this would be sandboxed.