You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/operate/control/single-page-apps.md
+53-71Lines changed: 53 additions & 71 deletions
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,16 @@ linkTitle: "Create a custom web interface"
4
4
weight: 11
5
5
no_list: true
6
6
type: docs
7
-
description: "Create and deploy single page applications on the Viam platform."
7
+
description: "Create and deploy custom web interfaces for your machines as single-page applications without managing hosting and authentication."
8
8
---
9
9
10
-
- Deploy front-end apps
11
-
-
12
-
13
-
you can have multiple HTML files
14
-
files have to all be deployed
15
-
16
-
With single page apps you can create and deploy custom web interfaces for your machines that use a single HTML page.
17
-
Single page apps are accessible from a dedicated URL (`appname_publicnamespace.viamapplications.com`) and hosting and authentication is handled for you.
18
-
19
-
google SPA and include what exactly that means
10
+
Create and deploy custom web interfaces for your machines as single-page applications without managing hosting and authentication.
11
+
Once deployed, apps are accessible from a dedicated URL (`appname_publicnamespace.viamapplications.com`) and hosting and authentication is handled for you.
20
12
21
13
When opening an app, users log in and then select a machine they have access to.
22
14
Then your app is rendered and ready for use.
23
15
24
-
TODO: Example GIF
16
+
{{<imgprocsrc="/operate/spa.png"resize="400x"declaredimensions=truealt="App screen asking for the org, location, and machine."class="imgzoom shadow">}}
25
17
26
18
## Requirements
27
19
@@ -41,11 +33,25 @@ Then authenticate your CLI session with Viam using one of the following options:
41
33
{{< table >}}
42
34
{{% tablestep number=1 %}}
43
35
44
-
**Build your single page application** using your preferred framework like React, Vue, Angular, or others.
45
-
Your application should be built and ready for deployment, with all assets compiled into a distributable format.
36
+
**Build your application** using your preferred framework like React, Vue, Angular, or others.
37
+
While you're developing use any machine's credentials.
38
+
For deploying your app you must add code to read the machine API key from your browsers local storage:
46
39
47
-
TODO: cover dev process
48
-
TODO: how do you connect to the machine / how do you access the api key?
|`name`| string | The name of your application, which will be a part of the app's URL (`name_publicnamespace.viamapplications.com`). For more information on valid names see [](/operate/reference/naming-modules). |
119
+
| Property | Type | Description |
120
+
| ------------ | ------ | ----------- |
121
+
|`name`| string | The name of your application, which will be a part of the app's URL (`name_publicnamespace.viamapplications.com`). For more information on valid names see [](/operate/reference/naming-modules#valid-application-identifiers). |
116
122
|`type`| string | The type of application (currently only `"single_machine"` is supported). |
117
123
|`entrypoint`| string | The path to the HTML entry point for your application. The `entrypoint` field specifies the path to your application's entry point. For example: <ul><li><code>"dist/index.html"</code>: Static content rooted at the `dist` directory</li><li><code>"dist/foo.html"</code>: Static content rooted at the `dist` directory, with `foo.html` as the entry point</li><li><code>"dist/"</code>: Static content rooted at the `dist` directory (assumes `dist/index.html` exists)</li><li><code>"dist/bar/foo.html"</code>: Static content rooted at `dist/bar` with `foo.html` as the entry point</li></ul> |
118
124
119
125
{{% /tablestep %}}
120
126
{{% tablestep number=3 %}}
127
+
**Register your module** with Viam:
128
+
129
+
{{< tabs >}}
130
+
{{% tab name="Template" %}}
121
131
122
-
**Package your app into a module and upload it** to the Viam Registry:
0 commit comments