nerves-hub/nerves_hub_link

Connect To Custom Server

Closed this issue · 2 comments

Hi,
I have a nerves hub instance up and running on our web server. I was reading through the documentation and didn't found any useful link which indicates how to change the URL to point somewhere else.

The Documentation only says

The following sections will walk you through updating your Nerves project to work with the nerves-hub.org NervesHub server. Using your own NervesHub server will require setting URLs to point elsewhere and is not covered below to simplify first usage.

Thanks @umerkiani ! I totally thought we had this documented, but it doesn't look like it 😢

In the meantime, there are a couple of config values for you to set to achieve this (either a config.exs or a Configurator if you have one defined

 config :nerves_hub_link,
  device_api_host: "your_host.com",
  device_api_port: 4001

The dev.exs is also a good place to look for some of the custom configurations for the CLI and API requests as well.

Another good spot to look is NervesHubLink.Configurator which pulls all values in from the Application env and is what builds the config at runtime for the app to use.

Hope that helps you for now and I'll get on documenting this better (unless you would like to contribute 😉 )

Thanks a lot for your quick support.