Go Program Configuration
Location
bash
./go/config/*
# Description
config.default.json // Default configuration file, loaded in both development and production environments
config.local.json // Development environment configuration file, appended and overrides the default configuration file
config.prod.json // Production environment configuration file, appended and overrides the default configuration fileContent
javascript
{
// Business logging
"logger": {
// Whether to output as JSON format
"output_json": false,
// Log level
"level": "info",
// Name
"filename": "ee-go.log",
// MaxSize: maximum size of the log file before rotation (in MB)
"max_size": 1024,
// Maximum number of days to retain old log files based on the timestamp encoded in the filename
"max_age": 10
},
// Framework logging
"core_logger": {
"output_json": false,
"level": "info",
"filename": "ee-go-core.log",
"max_size": 1024,
"max_age": 10
},
// HTTP service
"http": {
// Whether to enable, currently required
"enable": true,
// Port, lowest priority; the framework prioritizes the port passed from the electron/config/* configuration to the Go program
"port": 7073,
// Whether to enable network server; default hostname is 127.0.0.1, if enabled hostname becomes 0.0.0.0
"network": false
},
// Pack static resources into the Go binary program, used in production environment.
// If disabled, you need to manually place related resources in the extra resources directory.
// Before building the Go program, you must run the npm run move command (see below), to copy related resources to ./go/public/
"static": {
"enable": true,
// Required, program basic information
"package": "public/package.json",
// Required, Go config
"config": "public/config",
// Required, frontend resources
"dist": "public/dist"
}
}