Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Latest commit

 

History

History
56 lines (43 loc) · 1.18 KB

CONTRIBUTING.md

File metadata and controls

56 lines (43 loc) · 1.18 KB

Setting up a local development environment

Setup local env vars

export NERVES_HUB_HOME=./nerves-hub
export NERVES_HUB_HOST=0.0.0.0
export NERVES_HUB_PORT=4002
export NERVES_HUB_CA_DIR=/absolute/path/to/nerves_hub_web/test/fixtures/ssl/

Setup a local instance of Nerves Hub CA

git clone [email protected]:nerves-hub/nerves_hub_ca.git
cd nerves_hub_ca
source dev.env
mix do deps.get, nerves_hub_ca.init, ecto.create, ecto.migrate
iex -S mix

Setup a local instance of Nerves Hub

git clone [email protected]:nerves-hub/nerves_hub_web.git
cd nerves_hub_web
mix deps.get
docker-compose up -d
make reset-db
make server

Setup a local instance of NervesHub

Clone nerves_hub_link_http and fetch deps

git clone [email protected]:nerves-hub/nerves_hub_link_http.git
cd nerves_hub_link_http
mix deps.get

Authenticate as the default user.

email: [email protected] password: nerveshub

mix nerves_hub.user auth
NERVES_HUB_NON_INTERACTIVE=y mix nerves_hub.device create --identifier test --description test --tag test
mix deps.compile --force # this is to reload cert and key you just created
iex -S mix # make your changes, test em out etc.