mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 07:19:26 +00:00
Alpha version be update
This commit is contained in:
parent
f5f6f25a4a
commit
e1b13b3930
12 changed files with 86 additions and 42 deletions
|
|
@ -13,8 +13,8 @@ var configPath = "../public/config.js"
|
|||
|
||||
func EnvGet(key string) string {
|
||||
if !configFileExists() {
|
||||
createConfigFile(configPath)
|
||||
checkFeDevDir()
|
||||
CreateConfigFile(configPath)
|
||||
CheckFeDevDir()
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(configPath)
|
||||
|
|
@ -41,7 +41,8 @@ func configFileExists() bool {
|
|||
return err == nil
|
||||
}
|
||||
|
||||
func checkFeDevDir() {
|
||||
func CheckFeDevDir() {
|
||||
log.Println("Checking FE dev directory...")
|
||||
_, err := os.Stat("../fe")
|
||||
|
||||
if err != nil {
|
||||
|
|
@ -64,7 +65,7 @@ func copyConfigToFe() {
|
|||
}
|
||||
}
|
||||
|
||||
func createConfigFile(filename string) {
|
||||
func CreateConfigFile(filename string) {
|
||||
port, _ := findOpenPort()
|
||||
saltKey := GenerateKey()
|
||||
salt := saltKey[:28]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue