Skip to content

Latest commit

 

History

History
84 lines (54 loc) · 1.95 KB

README.md

File metadata and controls

84 lines (54 loc) · 1.95 KB

EW Dashboards

Configure Dashboards and their containing Widgets for consumption by the Dashboards UI.

Define a number of Data Sources that can be made available to the API or via Phoenix Channels over web sockets.

This is an umbrella project that contains a number of isolated, executable applications. See the nested READMEs for more info.

Local setup

# get src & libs
$ git clone https://github.com/energizedwork/ew-dashboards
$ cd ew-dashboards && mix deps.get

# create and migrate your database
$ mix ecto.create && mix ecto.migrate

# install Node.js?
$ npm install

# start Phoenix API endpoint
$ mix phx.server

# or with a REPL
$ iex -S mix phx.server

The API is available at localhost:4000 (not currently used in Prod UI !).

The UI uses the Phoenix Channel at ws://localhost:4000/socket/websocket

Test / Develop

# Run all apps tests
$ mix test

# TODO: add guard test runner

CI & Deployment

Heroku based deploys using Heroku CI. Pushes to origin/master will auto deploy on a green test run.

# deploy master
$ git push origin master
# deploy a branch
$ git remote add staging 	https://git.heroku.com/ew-dashboards-staging.git

$ git push staging my-branch-name:master

DB Seeds (non destructive)

$ heroku run bash
$ POOL_SIZE=2 mix run apps/api/priv/repo/seeds.exs

# view inserted rows
$ POOL_SIZE=2 iex -S mix

iex()> alias Core.Repo
iex()> alias Core.Schemas.DataSource
iex()> Repo.all DataSource