Skip to content

Commit 45046c6

Browse files
committed
Updating to not using a server
1 parent adfa974 commit 45046c6

17 files changed

+62836
-376
lines changed

Diff for: app.go

+8-26
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
wailsruntime "github.com/wailsapp/wails/v2/pkg/runtime"
1010
"io"
1111
"io/ioutil"
12-
"net/http"
12+
//"net/http"
1313
"os"
1414
"os/exec"
1515
"path/filepath"
@@ -39,30 +39,19 @@ type FileInfo struct {
3939
Modtime string
4040
}
4141

42+
type Environment struct {
43+
Name string `json:"name" binding:"required"`
44+
EnvVar []string `json:"envVar" binding:"required"`
45+
}
46+
47+
4248
// NewApp creates a new App application struct
4349
func NewApp() *App {
4450
return &App{}
4551
}
4652

4753
// startup is called at application startup
4854
func (b *App) startup(ctx context.Context) {
49-
//
50-
// Launch the server.
51-
//
52-
exeLoc := b.GetExecutable()
53-
exeParts := b.SplitFile(exeLoc)
54-
serverLoc := b.AppendPath(exeParts.Dir, "EmailItServer")
55-
fmt.Println(serverLoc)
56-
if b.FileExists(serverLoc) {
57-
//
58-
// There is the server file. Launch it.
59-
//
60-
var sar []string
61-
var ArgsArray [2]string
62-
ArgsArray[1] = "&"
63-
go b.RunCommandLine(serverLoc, ArgsArray[:], sar, exeParts.Dir)
64-
}
65-
fmt.Println("Everything is loaded...")
6655
}
6756

6857
// domReady is called after the front-end dom has been loaded
@@ -71,14 +60,6 @@ func (b *App) domReady(ctx context.Context) {
7160

7261
// shutdown is called at application termination
7362
func (b *App) shutdown(ctx context.Context) {
74-
//
75-
// Close the server.
76-
//
77-
req, err := http.NewRequest("DELETE", "http://localhost:9978/api/quit", nil)
78-
_, err = http.DefaultClient.Do(req)
79-
if err != nil {
80-
b.err = err.Error()
81-
}
8263
}
8364

8465
func (b *App) SystemOpenFile(prog string) {
@@ -316,3 +297,4 @@ func (b *App) GetOSName() string {
316297
}
317298
return result
318299
}
300+

Diff for: frontend/public/bundle.css

+2-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: frontend/public/bundle.js

+61,963-5
Large diffs are not rendered by default.

Diff for: frontend/public/bundle.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)