@@ -14,24 +14,27 @@ all the config values we need to run the application:
14
14
## A Note on API Keys
15
15
16
16
When you generate an API key pair at the URLs above, your API Secret will only
17
- be shown once - make sure to save this in a secure location,
17
+ be shown once - make sure to save this in a secure location,
18
18
or possibly your ` ~/.bash_profile ` .
19
19
20
20
## Setting Up The Application
21
21
22
22
Create a configuration file for your application:
23
+
23
24
``` bash
24
25
cp .env.template .env
25
26
```
26
27
27
28
Edit ` .env ` with the configuration parameters we gathered from above.
28
29
29
30
Next, we need to install our dependencies from npm:
31
+
30
32
``` bash
31
33
npm install
32
34
```
33
35
34
36
Now we should be all set! Run the application:
37
+
35
38
``` bash
36
39
npm start
37
40
```
@@ -43,6 +46,27 @@ video in both the tabs!
43
46
44
47
![ screenshot of chat app] ( https://s3.amazonaws.com/com.twilio.prod.twilio-docs/images/video2.original.png )
45
48
49
+ ## Using Docker
50
+
51
+ You need to build a docker image with the dependecies installed.
52
+
53
+ ``` bash
54
+ docker build -t video-quickstart-js .
55
+ ```
56
+
57
+ Once the image is created, you can run the container by running the ` docker run ` command. Replace the
58
+ variables ` $HOST_PORT ` , ` $PORT ` .
59
+
60
+ ``` bash
61
+ docker run -it --rm \
62
+ -p $HOST_PORT :$PORT \
63
+ --env-file .env \
64
+ video-quickstart-js:latest
65
+ ```
66
+
67
+ Add ` -d ` as an option for running in daemon mode.
68
+ Add ` --restart always ` options for restarting the container incase of failure or system restart.
69
+
46
70
## Examples
47
71
48
72
The project contains some common use-case examples for the Twilio Video JS SDK.
0 commit comments