This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kelp UI: package for windows via tail file web server with cors-enabl…
…ed /ping endpoint and add --no-electron (#394) * Kelp UI: --no-electron flag for server command * Kelp UI: copy kelp-start.bat in build script for windows * Kelp UI: add .exe to kelp-start.bat * Kelp UI: refactor file paths in server_amd64.go * Kelp UI: default to linux binary for ccxt when using windows * Kelp UI: make directories for windows in kelp-start.bat * Kelp UI: "cd -" unsupported on windows * Kelp UI: update openBrowser function * create a latch to trigger the browser opening once the backend server is loaded * added a line in server_amd64.go to print a line that should never be reached after the blocking call to start the server * add special HTML file to load initially for windows instead of the tail file's html * simplify opening of browser/electron with url variable * correct ajax condition in windows tail file html code * add /ping with cors header to check if server is online * fix cors impl. * update interval timeout to 1 second * host tail file as a web server for windows to avoid linking to a file
- Loading branch information
1 parent
5a5967c
commit 7172911
Showing
5 changed files
with
161 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package backend | ||
|
||
import ( | ||
"net/http" | ||
) | ||
|
||
func (s *APIServer) ping(w http.ResponseWriter, r *http.Request) { | ||
w.Header().Set("Access-Control-Allow-Origin", "*") | ||
w.WriteHeader(http.StatusOK) | ||
|
||
w.Write([]byte("ok")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bash -c "./Kelp" | ||
bash -c "mkdir -p .kelp/logs .kelp/assets .kelp/ccxt vendor" | ||
bash -c "./Kelp.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters