Update README.md

This commit is contained in:
brmnjsh 2020-02-02 22:06:56 -05:00 committed by GitHub
parent 97309cc086
commit 473cbd239f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,27 +38,6 @@ braid:
* `compose build braid` builds the braid image based on the latest transpiled javascript files
* `comopose up -d` starts the braid container based on the files in the braid folder, overriding the default braid build container
* you can see if braid is running by typing in `https://ysbraid.localhost`
* to connect to braid you need to use the url `wss://ysbraid.localhost?token={token}`
* the token is generated in the application that you're connecting to the braid app with (currently only measure has an implementation for this)
* you can generate a token for development in your local console (`app-console`) with the following commands:
```
hmac_secret = "test"
payload = {
:data => {
:channel_type => 'public/private/custom',
:client_type => 'public/private/custom',
:user_id => (yardstick user id),
:user_roles => and array with any combination of broadcaster/receiver/super,
:channel => 'desired channel name'
},
:sub => 'Braid JWT',
:aud => "internal",
:iss => 'Yardstick Software',
:exp => Time.now.to_i + 120 * 3600 (optional)}
token = JWT.encode payload, hmac_secret, "HS256"
```
* to connect to braid you need to use the url `ws://ysbraid.localhost`
* to test your changes before pushing you can run `tsc && npm test`
* to check code coverage run `nyc npm test`, we must maintain above 90% code coverage