mirror of
https://github.com/arnaucube/blockchainIDsystem.git
synced 2026-02-07 19:16:43 +01:00
peers propagation working fine, started to implement serverCA
This commit is contained in:
25
serverCA/readConfig.go
Executable file
25
serverCA/readConfig.go
Executable file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
//Config reads the config
|
||||
type Config struct {
|
||||
IP string `json:"ip"`
|
||||
Port string `json:"port"`
|
||||
ServerIP string `json:"serverip"`
|
||||
ServerPort string `json:"serverport"`
|
||||
ServerRESTPort string `json:"serverrestport"`
|
||||
WebServerPort string `json:"webserverport"`
|
||||
}
|
||||
|
||||
var config Config
|
||||
|
||||
func readConfig(path string) {
|
||||
file, err := ioutil.ReadFile(path)
|
||||
check(err)
|
||||
content := string(file)
|
||||
json.Unmarshal([]byte(content), &config)
|
||||
}
|
||||
Reference in New Issue
Block a user