mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
https flag for dev mode (#3603)
This commit is contained in:
parent
ed450c1268
commit
7941f00c35
1 changed files with 6 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ type DevOptions struct {
|
|||
|
||||
Config string `description:"The config file including path" default:"./build/devmode.config.yaml"`
|
||||
VitePort int `name:"port" description:"Specify the vite dev server port"`
|
||||
Secure bool `name:"s" description:"Enable HTTPS"`
|
||||
}
|
||||
|
||||
func Dev(options *DevOptions) error {
|
||||
|
|
@ -45,7 +46,11 @@ func Dev(options *DevOptions) error {
|
|||
os.Setenv(wailsVitePort, strconv.Itoa(port))
|
||||
|
||||
// Set url of frontend dev server
|
||||
os.Setenv("FRONTEND_DEVSERVER_URL", fmt.Sprintf("http://%s:%d", host, port))
|
||||
if options.Secure {
|
||||
os.Setenv("FRONTEND_DEVSERVER_URL", fmt.Sprintf("https://%s:%d", host, port))
|
||||
} else {
|
||||
os.Setenv("FRONTEND_DEVSERVER_URL", fmt.Sprintf("http://%s:%d", host, port))
|
||||
}
|
||||
|
||||
return Watcher(&WatcherOptions{
|
||||
Config: options.Config,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue