cleaning up an issue with client config generation
This commit is contained in:
6
.vscode/tasks.json
vendored
6
.vscode/tasks.json
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "Run Program",
|
||||
@@ -12,9 +12,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"taskName": "Build GopherJS",
|
||||
"taskName": "goReleaser Snapshot",
|
||||
"type": "shell",
|
||||
"command": "C:/Users/deranjer/go/bin/gopherjs.exe build C:/Users/deranjer/GoglandProjects/torrent-project/public/static/js/frontend-websocket.go",
|
||||
"command": "C:/Users/deranjer/go/bin/goreleaser.exe -rm-dist -snapshot",
|
||||
"problemMatcher": [
|
||||
"$go"
|
||||
]
|
||||
|
@@ -36,6 +36,10 @@ func GenerateClientConfigFile(config FullClientSettings, authString string) {
|
||||
const ClientUsername = "` + config.ClientUsername + `"
|
||||
const ClientPassword = "` + config.ClientPassword + `"
|
||||
`
|
||||
} else {
|
||||
webUIAuth = `
|
||||
const LoginRequired = false
|
||||
`
|
||||
}
|
||||
|
||||
if config.UseProxy {
|
||||
|
1
main.go
1
main.go
@@ -192,6 +192,7 @@ func main() {
|
||||
|
||||
router.HandleFunc("/websocket", func(w http.ResponseWriter, r *http.Request) { //websocket is the main data pipe to the frontend
|
||||
conn, err := upgrader.Upgrade(w, r, nil)
|
||||
fmt.Println("Websocket connection here")
|
||||
defer conn.Close() //defer closing the websocket until done.
|
||||
if err != nil {
|
||||
Logger.WithFields(logrus.Fields{"error": err}).Fatal("Unable to create websocket!")
|
||||
|
Reference in New Issue
Block a user