react-native-static-server
react-native-static-server copied to clipboard
Question about support for multiple server instances
Hi,
First, thanks for maintaining this project.
In my project we'll soon need to handle multiple http servers running on different ports. For now we are using a very naive NanoHTTP implementation (that don't support multiple servers yet) and we are considering switching for your library as it seems more future-proof.
In your documentation and code, you specify that it is not possible to run multiple native instances at the same time.
https://github.com/birdofpreyru/react-native-static-server/blob/55edd510f8fe9bc94c157c383c6609292b82b230/README.md?plain=1#L556-L562
https://github.com/birdofpreyru/react-native-static-server/blob/55edd510f8fe9bc94c157c383c6609292b82b230/android/src/main/java/com/drpogodin/reactnativestaticserver/ReactNativeStaticServerModule.kt#L19-L24
My comprehension from those comments is that the limitation is because it is not implemented yet, but it should be technically possible with some work. Is that correct?
If yes, do you have any plan for this feature? Would you accept some PRs if we try implementing it?