Skip to content
Snippets Groups Projects
Jono Wenger's avatar
Jono Wenger authored
Update for new client API

See merge request elixxir/shielded-help-demo/anonymous-chat!1
78e58847
History
Name Last commit Last update
chat
cmd
.gitignore
Makefile
README.md
go.mod
go.sum
main.go

Shielded Help Demo

Anonymous Chat Server

This repo demonstrates the use of the connections API to create an anonymous chat server, where users can receive support anonymously

Setup & Execution

To start the server, download or compile the appropriate binary for your system, set up a config file and run the following command:

./chat.binary -c path/to/config.yaml

This will start the chat server & output a contact file containing the server's identity to the configured path.

Compilation Steps:

go mod vendor -v
go mod tidy
# Linux 64 bit binary
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o chat.linux64 main.go
# Windows 64 bit binary
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o chat.win64 main.go
# Windows 32 big binary
GOOS=windows GOARCH=386 CGO_ENABLED=0 go build -ldflags '-w -s' -o release/chat.win32 main.go
# Mac OSX 64 bit binary (intel)
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-w -s' -o release/chat.darwin64 main.go

Example Config

# ==================================
# Anonymous Chat Server Configuration
# ==================================

# START YAML ===
# Verbose logging
logLevel: 1
# Path to log file
log: "/cmix/anonymous-chat.log"

# Path to NDF
ndf: ""

# Storage path and password
storageDir: ""
storagePass: ""

# Contact output path
contact: ""

# === END YAML