daemon for mindoc
# build
go build -o mindoc-daemon.exe main.go
# direct run mindoc
mindoc-daemon.exe
# mindoc-daemon service command
mindoc-daemon.exe -service <command>installuninstallstartstoprestart
the configuration file is mindoc-daemon.json, which must be in the same folder as the mindoc-daemon executable file, and the content is as follows:
{
"Name": "MinDoc",
"DisplayName": "MinDoc",
"Description": "A document online management program.",
"Dir": "E:\\own\\go\\mindoc",
"Exec": "E:\\own\\go\\mindoc\\mindoc_windows_amd64.exe",
"Args": [],
"Env": [
"MINDOC_RUN_MODE=dev",
"MINDOC_HIGHLIGHT_STYLE=github"
],
"Stderr": "",
"Stdout": ""
}the full configuration file example is mindoc-daemon-full.json.example.
explanation of main configuration items:
Dirworking directory of mindoc, please change it to your self.Execthe full path of the mindoc executable file, please change it to your self.Stderrthe full path of error log, or standard error if empty, please change it to your self if you want use file to store log.Stdoutthe full path of output log, or standard output if empty, please change it to your self if you want use file to store log.