mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 07:19:26 +00:00
WIP: auto env generator
This commit is contained in:
parent
3cc0a2017d
commit
0a4e798e86
5 changed files with 99 additions and 8 deletions
|
|
@ -10,11 +10,18 @@ import (
|
|||
func main() {
|
||||
app.MCRMLogInit()
|
||||
|
||||
if helper.EnvGet("MCRM__PORT") == "" {
|
||||
app.MCRMLog("Error: MCRM__PORT is not set")
|
||||
}
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
apiInit(w, r)
|
||||
})
|
||||
|
||||
helper.OpenBrowser("http://localhost:" + helper.EnvGet("MCRM__PORT"))
|
||||
|
||||
app.MCRMLog(http.ListenAndServe(":"+helper.EnvGet("MCRM__PORT"), nil))
|
||||
|
||||
}
|
||||
|
||||
func apiInit(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue