THNG-Push
Unofficial Elixir pub/sub client for EVRYTHNG.com.
An experiment in combining the real-time push web of things with a 12 MB binary running on the BEAM VM.
Installation
If available in Hex, the package can be installed
by adding thngpush
to your list of dependencies in mix.exs
:
def deps do
[{:thngpush, "~> 0.17.0"}]
end
Build
Build requires [emqtcc](git@github.com:emqtt/emqttc.git) to be available in a sibling folder.
cd ..
git clone https://github.com/emqtt/emqttc.git
cd emqttc
make
REPL
Connect and disconnect using a key read from ENV:
alias Evrythng.ThngPush.Client, as: Client
key = System.get_env("EVT_OPERATOR_KEY")
{:ok, pid} = Client.start_link(key)
GenServer.stop(pid)
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) and published on [HexDocs](https://hexdocs.pm). Once published, the docs can be found at [https://hexdocs.pm/thngpush](https://hexdocs.pm/thngpush).
License
Copyright © 2017 Devstopfix
Distributed under the Apache License either version 2.0. Not officially supported by EVRYTHNG.com.