creamy-slanger

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2018 License: AGPL-3.0 Imports: 16 Imported by: 0

README

Creamy Slanger

I wanted to play with golang and thought remaking Slanger would be a fun start.

This is not currently production ready, but I'm working on it ™

Building

go get
go build

Running

creamy-slanger does the following by default:

  • listen for both websocket and API calls on 0.0.0.0:8080
  • use the redis server at 0.0.0.0:6379, no password, database 0
  • set app key as foo
  • hide debug output

Options can be changed with ENV vars or a config file.

Configuring with ENV

Common:

CREAMY_SLANGER_APP_KEY=foo \
CREAMY_SLANGER_REDIS_ADDRESS=0.0.0.0:6379 \
./creamy-slanger

Exhaustive:

CREAMY_SLANGER_DEBUG=true \
CREAMY_SLANGER_APP_KEY=foo \
CREAMY_SLANGER_WEBSOCKET_HOST=0.0.0.0 \
CREAMY_SLANGER_WEBSOCKET_PORT=8080 \
CREAMY_SLANGER_WEBSOCKET_TIMEOUT=120 \
CREAMY_SLANGER_REDIS_ADDRESS=0.0.0.0:6379 \
CREAMY_SLANGER_REDIS_PASSWORD=foo \
CREAMY_SLANGER_REDIS_DATABASE=0 \
./creamy-slanger
Configuring with file

See config.sample.json:

{
  "debug": true,
  "app": {
    "key": "foo"
  },
  "websocket": {
    "host": "0.0.0.0",
    "port": "8080",
    "timeout": 120
  },
  "redis": {
    "address": "0.0.0.0:6379",
    "password": "",
    "database": 0
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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