Wails: How to run two different wails serve applications on one host?

Created on 28 Apr 2020  路  7Comments  路  Source: wailsapp/wails

Description

I want to develop two difference GUI apps at the same time. but wails uses one port for brige interface

To Reproduce
Steps to reproduce the behaviour:

  1. Run wails serve on first folder
  2. Run wails serve on second folder
  3. Bind address already in use error occurs

Expected behaviour
Standard environment

Screenshots

System Details

| Name | Value |
| ----- | ----- |
| Wails Version | v1.0.3-pre2 |
| Go Version | go1.13.6 |
| Platform | darwin |
| Arch | amd64 |
| GO111MODULE | (Not Set) |
| GCC | 11.0.3 |
| Npm | 6.14.4 |
| Node | v14.0.0 |

enhancement wontfix

Most helpful comment

@tmclane @leaanthony
having wails server check for port and if in use simply +1 from go's perspective seems trivial and useful.
Is there an easy way for the js part to follow the right port?

All 7 comments

This isn't currently possible without editing the source.

@tmclane @leaanthony
having wails server check for port and if in use simply +1 from go's perspective seems trivial and useful.
Is there an easy way for the js part to follow the right port?

That's a great idea. Not sure of the use case but why not. Trivia #1 it's Wails 1St open source birthday. Trivia #2 the websockets port is "wails" with a sideways w

Created a branch: https://github.com/wailsapp/wails/tree/399---Add-serve-port-flag
This seems to work with one weird side-effect: specifying a port other than 34115 results in a delay during connection. @tmclane - any thoughts?

@leaanthony - I'll check this branch today

How did you go @svkior ?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kelus picture kelus  路  6Comments

bh90210 picture bh90210  路  5Comments

ahmadfarisfs picture ahmadfarisfs  路  3Comments

VladislavSournine picture VladislavSournine  路  5Comments

bh90210 picture bh90210  路  3Comments