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
host
and port
are ignored for the desktop builds
#410
Comments
Hello there. I'm looking to run Nuxt.JS local web server with hot reloading for development purposes and then automatically make a static build when I build the app. I think this issue should get more attention since this is critical for development environments and a total blocker for my working environment for example. Somehow this piece of code is not properly working: Line 901 in a96824c
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Moved to |
@lamiazar let's keep it in TODO until someone will pick it |
Hi! After some experimentation with the project, I was able to get the dev server URL working on mac desktop with a few changes to diff --git a/src/cli/cli.cc b/src/cli/cli.cc
index 88fce1d5..30ed1ebd 100644
--- a/src/cli/cli.cc
+++ b/src/cli/cli.cc
@@ -2150,7 +2150,7 @@ int main (const int argc, const char* argv[]) {
settings.insert(std::make_pair("host", devHost));
String devPort = "0";
- if (optionsWithValue.count("port") > 0) {
+ if (optionsWithValue.count("--port") > 0) {
devPort = optionsWithValue["--port"];
}
settings.insert(std::make_pair("port", devPort));
diff --git a/src/desktop/main.cc b/src/desktop/main.cc
index 1a46db82..b4b25491 100644
--- a/src/desktop/main.cc
+++ b/src/desktop/main.cc
@@ -67,7 +67,7 @@ MAIN {
static App* app_ptr = &app;
app.setWindowManager(&windowManager);
- constexpr auto _port = PORT;
+ const auto _port = getDevPort();
const SSC::String OK_STATE = "0";
const SSC::String ERROR_STATE = "1"; Apologies for not submitting a full PR, I feel a little worried about the impact of the changes (didn't fully examine the impact). Happy to help wherever I can, |
Hi @nnnnathann, We'd happily review a PR if you could make one |
Sure, no problem. Created one over here: #565 |
Fixed by #565 |
@davidmyersdev paths like |
I finally had a chance to test this again, and I can confirm it works as expected now! Thanks so much! |
We only pass these two values when run on iOS or Android, but they should work for desktop builds as well
The text was updated successfully, but these errors were encountered: