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>
+19 -11
View File
@@ -1,6 +1,7 @@
# 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
@@ -17,7 +18,8 @@ Docs & Guides at: https://docs.livekit.io
## 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
@@ -65,8 +67,9 @@ LiveKit is published to Docker Hub under [livekit/livekit-server](https://hub.do
### Creating API keys
LiveKit utilizes JWT based access tokens for authentication to all of its APIs.
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).
LiveKit utilizes JWT based access tokens for authentication to all of its APIs. 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).
Generate API key/secret pairs with:
@@ -88,8 +91,9 @@ APIwLeah7g4fuLYDYAJeaKsSE: 8nTlwISkb-63DPP7OH4e.nw.J44JjicvZDiz8J59EoQ+
### 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`.
LiveKit could also use a [config file](config-sample.yaml) or config environment variable `LIVEKIT_CONFIG`
In development mode, LiveKit has no external dependencies. You can start LiveKit by passing it the keys it should use
in `LIVEKIT_KEYS`. LiveKit could also use a [config file](config-sample.yaml) or config environment
variable `LIVEKIT_CONFIG`
```shell
LIVEKIT_KEYS="<key>: <secret>" ./bin/livekit-server --dev
@@ -108,14 +112,16 @@ docker run --rm \
--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
### Creating a JWT 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
./bin/livekit-server --key-file <path/to/keyfile> create-join-token --room "myroom" --identity "myidentity"
@@ -123,10 +129,10 @@ This token has an expiration of a month, which is useful for development & testi
### Sample client
To test your server, you can use our [example web client](https://example.livekit.io/)
To test your server, you can use our [example web client](https://example.livekit.io/)
(built with our [React component](https://github.com/livekit/livekit-react))
Enter generated access token and you are connected to a room!
Enter generated access token and you are connected to a room!
## Deploying for production
@@ -136,7 +142,9 @@ See deployment docs at https://docs.livekit.io/guides/deploy
## 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
+2 -7
View File
@@ -158,22 +158,17 @@ func generateWire() error {
fmt.Println("wiring...")
cmd := exec.Command("go", "generate", "./cmd/...")
connectStd(cmd)
if err := cmd.Run(); err != nil {
return err
}
wire, err := getToolPath("wire")
if err != nil {
return err
}
cmd = exec.Command(wire)
cmd := exec.Command(wire)
cmd.Dir = "pkg/service"
connectStd(cmd)
if err := cmd.Run(); err != nil {
return err
}
return nil
}
+2 -1
View File
@@ -1,10 +1,11 @@
package service_test
import (
"testing"
"github.com/go-redis/redis/v8"
"github.com/livekit/livekit-server/pkg/service"
"github.com/stretchr/testify/require"
"testing"
)
func redisClient() *redis.Client {