command module
Version: v0.0.0-...-1a912f8 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2019 License: GPL-3.0 Imports: 23 Imported by: 0



Instant messenger for local network

Current standalone application is messenger's server, there isn't UI

System Capabilities

  • Working without a setup
  • Auto producing self-signed SSL certificates
  • Embedded database
  • Files holding
  • Declarative settings
  • Logging to a file

Messenger Capabilities

  • User's sing in and sing up
  • Creating chat
  • Invite users to a chat
  • Block users in the chat
  • Leave chat
  • Upload docs
  • Instant messaging via WebSocket

Installation and run

Getting repository

go get github.com/alxarno/swap

All deps are in vendor folder

Running only API server, without web UI.

For running with web UI look below

go run main.go logo.go  router.go  router_without_ui.go

Also you can start by fresh, with auto rebuild

go get github.com/pilu/fresh


After starting swap server, it create swap.json file, if it doesnt exist. The swap.json contains swap's settings.

		"fileLogs": true, // swap will logging to swap.log file, instead stdout
		"host": "80", // base host for http (will auto redirect to sslhost)
		"sslhost": "443", // https host
		"secret_key_for_token": "CGli0F5jNe3RhLCfVyEBTw==", // auto produced random string for creating some tokens
		"files_path": "./files/" // folder for containing files
		"org": "Example Co", // self-signed cert's company name 
		"hosts": ["","localhost",""], // self-signed cert's hosts
		"rsa-bits":2048 // key bits
		"max_file_size_byte": 104857600, // max uploaded file size (1MB)
		"max_minutes_available_for_files_download": 5, // temporary donwload link time
		"cors": false // cross-domain requests
			"file_path": "swap.db" // DB file name


After starting swap server, it create swap.crt and swap.key files, if they don't exist.

They are generated based on information in swap.json

You can generate your own certificate and key, and put it like swap.crt and swap.key


For build executable install packr and run


It download UI, make go classes by packr and compile all

Now supporting building only for current OS

Result will appear in releases folder

Built With


You can download the latest portable version of Swap




The Go Gopher

There is no documentation for this package.


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL