Under development. Might replace https://tonyrog/exoweb
To build exoweb you will need a working installation of Erlang R15B (or
later).
Information on building and installing Erlang/OTP
can be found here
(more info).
exoweb is built using rebar that can be found here, with building instructions here. rebar's dynamic configuration mechanism, described here, is used so the environment variable REBAR_DEPS
should be set to the directory where your erlang applications are located.
exoweb also requires the following erlang applications to be installed:
- wse - https://github.com/tonyrog/wse
- yaws - https://github.com/klacke/yaws
- exodmapi - https://github.com/Feuerlabs/exodmapi
- exo - https://github.com/Feuerlabs/exo
- sync - https://github.com/rustyio/sync
- gettext - https://github.com/Feuerlabs/gettext/li>
- gen_smtp - https://github.com/Vagabond/gen_smtp
- lager - https://github.com/basho/lager
If you want to run in debug mode add:
exoweb is built on the angularjs frameworks, see Installation below.
You need a web browser to access the exoweb site.
Clone the repository in a suitable location:
$ git clone git://github.com/malotte/exoweb_js.git
Apart from the above stated erlang applications you also need to install a number of angularjs components. This is done using bower which must be installed first:
$ cd exoweb/www
$ npm install bower
The needed components are specified in a bower.json-file and are installed by:
$ cd exoweb/www
$ bower install
exoweb is a web service, using inets, connecting to exodm. It must thus be configured to find a suitable exodm server and a suitable http port to listen must be choosen.
exoweb uses gen_smtp for sending email and thus the smtp parameters must also be correctly set up.
Arguments to all applicable erlang applications are specified in an erlang configuration file.
An example can be found in "sys.config".
Good practise is to copy this to a local .config-file and use that file when starting the application.
- Only runs on Linux/Unix (uses os commands)
- Max 100 devices.
- Exactly one role/user.
- Only predefined roles.
- Unstable :-)
Rebar will compile all needed dependencies.
Compile:
$ cd exoweb
$ rebar compile
...
==> exoweb (compile)
There is a quick way to run the application for testing:
$ erl -config <your local config file> -pa <path>/exoweb/ebin
>exoweb:start().
Note: The config file is specified without its .config-extension.
Note: Full path is needed.
(Instead of specifing the path to the ebin directory you can set the environment variable ERL_LIBS
.)
It is possible to run a debug version using:
>exoweb:start_dbg().
Note: Requires ale, see above.
Stop:
>halt().
exoweb is documented using edoc. To generate the documentation do:
$ cd exoweb
$ rebar doc
The result is a collection of html-documents under exoweb/doc
.