Skip to content

go-home-io/server

Repository files navigation

Build Status FOSSA Status

Coverage Status Go Report Card BCH compliance

go-home server

Development environment

go-home uses go 1.13 with modules support, but to provide compatibility with no-modules environments, all scripts are expecting to have go-home.io/x under ${GOPATH}/src folder.

For running on MaOS, gmake has to be installed since regular make has version 3.8 which does not support ONESHELL. You can install it using brew:

 brew install homebrew/core/make

You'll need at least nsq running on your machine. You can install it through brew:

brew install nsq

Then start it:

nsqd -broadcast-address=127.0.0.1

Checkout both server and providers repos into ${GOPATH}/src/go-home.io/x folder, place your config files under server/configs. Minimal required configuration is:

system: bus
provider: nsq
server: 127.0.0.1:4150

---

system: go-home
provider: master
port: 8000
delayedStart: 0

---

system: go-home
provider: worker
name: worker-1

Start both worker and master by running:

gmake run-worker
gmake run-only-server

Preparing commit

To run all required validations simply run:

gmake git

Which includes:

  • dep-ensure -- running go mod tidy
  • generate -- auto-generating all required files
  • lint -- running all configured linters
  • test-local -- running all available tests

Known issues

x/tools/cmd/goimports doesn't work well with modules, sometimes it removes correct package. To bypass this install this package without modules, e.g.:

GO111MODULE=off go get github.com/vkorn/go-miio

monkey patching from an IDE must be executed with an extra params:

-gcflags=-l

License

FOSSA Status