Add note about node-ip being public IP

This commit is contained in:
David Zhao
2021-11-30 08:57:44 -08:00
parent c47ad5e323
commit a799069392
4 changed files with 23 additions and 27 deletions
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions">
<enabled-global>
<option value="goimports" />
</enabled-global>
</component>
</project>
+17 -9
View File
@@ -1,6 +1,7 @@
# LiveKit - Open source, distributed video/audio rooms over WebRTC # LiveKit - Open source, distributed video/audio rooms over WebRTC
LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. It's designed to give you everything you need to build real time video/audio capabilities in your applications. LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. It's designed to give you
everything you need to build real time video/audio capabilities in your applications.
## Features ## Features
@@ -17,7 +18,8 @@ Docs & Guides at: https://docs.livekit.io
## Try it live ## Try it live
Head to [our playground](https://livekit.io/playground) and give it a spin. Build a Zoom-like conferencing app in under 100 lines of code! Head to [our playground](https://livekit.io/playground) and give it a spin. Build a Zoom-like conferencing app in under
100 lines of code!
## SDKs & Tools ## SDKs & Tools
@@ -65,8 +67,9 @@ LiveKit is published to Docker Hub under [livekit/livekit-server](https://hub.do
### Creating API keys ### Creating API keys
LiveKit utilizes JWT based access tokens for authentication to all of its APIs. LiveKit utilizes JWT based access tokens for authentication to all of its APIs. Because of this, the server needs a list
Because of this, the server needs a list of valid API keys and secrets to validate the provided tokens. For more, see [Access Tokens guide](https://docs.livekit.io/guides/access-tokens). of valid API keys and secrets to validate the provided tokens. For more,
see [Access Tokens guide](https://docs.livekit.io/guides/access-tokens).
Generate API key/secret pairs with: Generate API key/secret pairs with:
@@ -88,8 +91,9 @@ APIwLeah7g4fuLYDYAJeaKsSE: 8nTlwISkb-63DPP7OH4e.nw.J44JjicvZDiz8J59EoQ+
### Starting the server ### Starting the server
In development mode, LiveKit has no external dependencies. You can start LiveKit by passing it the keys it should use in `LIVEKIT_KEYS`. In development mode, LiveKit has no external dependencies. You can start LiveKit by passing it the keys it should use
LiveKit could also use a [config file](config-sample.yaml) or config environment variable `LIVEKIT_CONFIG` in `LIVEKIT_KEYS`. LiveKit could also use a [config file](config-sample.yaml) or config environment
variable `LIVEKIT_CONFIG`
```shell ```shell
LIVEKIT_KEYS="<key>: <secret>" ./bin/livekit-server --dev LIVEKIT_KEYS="<key>: <secret>" ./bin/livekit-server --dev
@@ -108,14 +112,16 @@ docker run --rm \
--node-ip=<machine-ip> --node-ip=<machine-ip>
``` ```
When running with docker, `--node-ip` needs to be set to your machine's local IP address. When running with docker, `--node-ip` needs to be set to your machine's IP address. If the service is to be exposed to
public internet, this should the machine's public IP.
The `--dev` flag turns on log verbosity to make it easier for local debugging/development The `--dev` flag turns on log verbosity to make it easier for local debugging/development
### Creating a JWT token ### Creating a JWT token
To create a join token for clients, livekit-server provides a convenient subcommand to create a **development** token. To create a join token for clients, livekit-server provides a convenient subcommand to create a **development** token.
This token has an expiration of a month, which is useful for development & testing, but not appropriate for production use. This token has an expiration of a month, which is useful for development & testing, but not appropriate for production
use.
```shell ```shell
./bin/livekit-server --key-file <path/to/keyfile> create-join-token --room "myroom" --identity "myidentity" ./bin/livekit-server --key-file <path/to/keyfile> create-join-token --room "myroom" --identity "myidentity"
@@ -136,7 +142,9 @@ See deployment docs at https://docs.livekit.io/guides/deploy
## Contributing ## Contributing
We welcome your contributions to make LiveKit better! Please join us [on Slack](https://join.slack.com/t/livekit-users/shared_invite/zt-rrdy5abr-5pZ1wW8pXEkiQxBzFiXPUg) to discuss your ideas and/or submit PRs. We welcome your contributions to make LiveKit better! Please join
us [on Slack](https://join.slack.com/t/livekit-users/shared_invite/zt-rrdy5abr-5pZ1wW8pXEkiQxBzFiXPUg) to discuss your
ideas and/or submit PRs.
## License ## License
+2 -7
View File
@@ -158,22 +158,17 @@ func generateWire() error {
fmt.Println("wiring...") fmt.Println("wiring...")
cmd := exec.Command("go", "generate", "./cmd/...")
connectStd(cmd)
if err := cmd.Run(); err != nil {
return err
}
wire, err := getToolPath("wire") wire, err := getToolPath("wire")
if err != nil { if err != nil {
return err return err
} }
cmd = exec.Command(wire) cmd := exec.Command(wire)
cmd.Dir = "pkg/service" cmd.Dir = "pkg/service"
connectStd(cmd) connectStd(cmd)
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
return err return err
} }
return nil return nil
} }
+2 -1
View File
@@ -1,10 +1,11 @@
package service_test package service_test
import ( import (
"testing"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
"github.com/livekit/livekit-server/pkg/service" "github.com/livekit/livekit-server/pkg/service"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"testing"
) )
func redisClient() *redis.Client { func redisClient() *redis.Client {