Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose webServer.serverURL property #30

Closed
rangav opened this issue Feb 1, 2018 · 0 comments
Closed

expose webServer.serverURL property #30

rangav opened this issue Feb 1, 2018 · 0 comments

Comments

@rangav
Copy link

rangav commented Feb 1, 2018

Hi

Can you please expose server url property so when server is already running, we can access the url without starting it again.

// example use case
let server = new StaticServer(8080, path, { keepAlive: true });

if (!server.running) {
            var url = await server.start();
            console.log("Server URL", url);
} else {
           // get server url 
       var url = server.serverUrl;  
}

One more question => Should we have only single instance of server with in the app? What is server initialization recommendation?

smellman pushed a commit to smellman/react-native-static-server that referenced this issue Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant