|
All checks were successful
Build for Windows/amd64 / build (push) Successful in 3m13s
|
||
|---|---|---|
| .forgejo/workflows | ||
| cardprinter | ||
| frontend | ||
| internal | ||
| .editorconfig | ||
| .gitignore | ||
| CODEOWNERS | ||
| cups-options.yaml | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| Justfile | ||
| LICENSE.md | ||
| main.go | ||
| main_unix.go | ||
| main_windows.go | ||
| README.md | ||
| renovate.json | ||
| routes.go | ||
| screenshot.png | ||
cardprinterd
HTTP printer server in Go for the CR805 Card Printer.
Install
To deploy cardprinterd on a Windows machine, NSSM is needed.
You also need to run nssm.exe inside an Administrator command prompt to
install the service.
First, ensure that you have Go installed or you're in the Nix shell. Then, run the following command to build the binary:
just build
Then, move the file over to the Windows machine. You can use croc or start a
file server with caddy for this.
Once it's on the machine, it is recommended to move it into C:\Program Files\cardprinterd along with NSSM:
C:\
Program Files\
cardprinterd\
cardprinterd.exe
nssm.exe
stderr.txt
Also make sure you have the LAN IP of the computer. You can obtain this via
ipconfig in a Command Prompt.
Then, run the following command to install the service:
.\nssm.exe install cardprinterd
Ensure that the arguments are set like so:
-verbose -host <LAN IP> -port 80
You may optionally include any additional flags here. Check cardprinterd -h
for all the possible flags.
Once saved, you can start the service with:
.\nssm.exe start cardprinterd
Updating
When updating, you need to stop the service first:
.\nssm.exe stop cardprinterd
Then, replace the cardprinterd.exe file with the new one. You can do whatever
you did when you first installed it. Once it's replaced, you can start the
service again:
.\nssm.exe start cardprinterd