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

Run localhost in production mode #336

Open
Charles808 opened this issue Mar 25, 2023 · 5 comments
Open

Run localhost in production mode #336

Charles808 opened this issue Mar 25, 2023 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@Charles808
Copy link

Using nextron default example, the dev app will be run on localhost, while the production will be run on "app://.index.html"

My problem is, I'm using Salesforce REST API, which only able to whitelist application using HTTPS or HTTP (only for localhost) url. Therefore, nextron app is working on dev but failed at production app because the origin is changed.

Is it possible to configure my nextron app, so at production build, it also using localhost ?

@azwalzaman
Copy link

I need this as well for similar reasons

@madaghafuri
Copy link

I need it for handling another window with dynamic route in production. Or is it already possible and if it is do have any resource on it?

@saltyshiomix saltyshiomix added enhancement New feature or request good first issue Good for newcomers question Further information is requested help wanted Extra attention is needed labels Sep 13, 2023
@d-mashchenko
Copy link

It's also necessary, maybe someone knows a workaround. In production mode google api prohibits url like: "app://.index.html"

@bm777
Copy link
Collaborator

bm777 commented Dec 2, 2023

@Charles808 @azwalzaman @madaghafuri @d-mashchenko
The best workaround is to use a single static file (index.html) with a combined components game, just to have a good orchestration of components on a single page.

@pixelass
Copy link
Collaborator

pixelass commented May 1, 2024

We allow running static pages as extensions of our app. These might also require https (or localhost), for certain Web APIs like mediaSources, so what we do is to just use electron serve with a separate protocol per app/extesnion and set the host to "localhost". Works like a charm: https://github.com/blib-la/captain/blob/f5d79534f0424198562f320a13a310ce7a08c460/src/electron/helpers/app-loaders.ts#L79-L125

specifically this part: https://github.com/blib-la/captain/blob/f5d79534f0424198562f320a13a310ce7a08c460/src/electron/helpers/app-loaders.ts#L117-L122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants