Skip to content

Commit

Permalink
[lee] make domain name configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
llawlor committed Dec 31, 2018
1 parent 692a944 commit 8663a38
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/views/devices/setup.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-header">
<%= Rails.application.config_for(:limitos)['domain'] %><div class="page-header">
<h1>
<%= @device.display_name %>
<div class="pull-right">
Expand All @@ -19,7 +19,7 @@

<h4>Device Control Example</h4>
<pre>
HTTP POST https://limitos.com/api/v1/devices/<%= @device.id %>/control
HTTP POST https://<%= Rails.application.config_for(:limitos)['domain'] %>/api/v1/devices/<%= @device.id %>/control
auth_token=<%= @device.auth_token %>
pin=<%= @device.pins.try(:first).try(:pin_number) || 4 %>
digital=on</pre>
Expand Down
4 changes: 2 additions & 2 deletions app/views/docs/api.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>API</h1>

<h2>Control a Device</h2>
To control a device, send an HTTP POST request to https://limitos.com/api/v1/devices/<b>DEVICE_ID</b>/control ,
To control a device, send an HTTP POST request to https://<%= Rails.application.config_for(:limitos)['domain'] %>/api/v1/devices/<b>DEVICE_ID</b>/control ,
replacing <b>DEVICE_ID</b> with the ID of your device.

<br><br>
Expand All @@ -19,7 +19,7 @@ Parameters:
Example POST request:
<br><br>
<pre>
POST https://limitos.com/api/v1/devices/<b>1</b>/control
POST https://<%= Rails.application.config_for(:limitos)['domain'] %>/api/v1/devices/<b>1</b>/control
auth_token=<b>XXXXXXXXXXXXXXXXXX</b>
pin=<b>4</b>
digital=<b>on</b>
Expand Down
2 changes: 1 addition & 1 deletion app/views/docs/installation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ol>
<li>Log in as a root user on your Raspberry Pi (default username is "pi", default password is "raspberry")</li>
<li>Type (or copy/paste) the following command: curl -sS <%= full_server_url %>/install | bash</li>
<li>When you see a registration code appear, go to <a href="https://limitos.com/register">https://limitos.com/register</a> (on any device) and type in your registration code</li>
<li>When you see a registration code appear, go to <a href="https://<%= Rails.application.config_for(:limitos)['domain'] %>/register">https://<%= Rails.application.config_for(:limitos)['domain'] %>/register</a> (on any device) and type in your registration code</li>
</ol>

<br>
Expand Down
1 change: 1 addition & 0 deletions config/limitos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ defaults: &defaults
application_name: 'LimitOS' # global name for the application
application_name_part_1: 'Limit' # homepage header blue text
application_name_part_2: 'OS' # homepage header yellow text
domain: 'limitos.com' # domain for the application
limitos_client_version: '2018-12-30' # version of the nodejs install script, updating this will cause connected clients to update their scripts
video_from_devices_host: 'ws://localhost:8081' # host for video requests originating from devices (cameras)
video_to_clients_host: 'ws://localhost:8082' # host for video requests going to clients (browsers)
Expand Down

0 comments on commit 8663a38

Please sign in to comment.