2019-03-14 17:08:11 -04:00
2019-02-28 23:21:06 -05:00
2019-02-28 23:21:06 -05:00
2019-02-27 12:16:34 -05:00
2019-02-28 23:21:06 -05:00
2019-02-28 17:49:46 -05:00
2019-02-27 12:16:34 -05:00
2019-02-27 12:16:34 -05:00
2019-02-28 23:21:06 -05:00
2019-03-14 10:14:42 -04:00
rc
2019-02-27 12:16:34 -05:00
2019-03-14 16:49:41 -04:00
2019-02-28 17:49:46 -05:00

BRAID v0.8.5

Websocket server for the Measure platform

Build Status

Essential Information:

Setting up

  • download the braid repo into a folder in the same directory as the primary yardstick folder
  • vagrant up in the primary yardstick folder
  • run the command compose stop braid && compose rm braid && tsc && compose build braid && compose up -d
    • compose stop stops the default braid container that vagrant up builds
    • compose rm braid removes the default braid container
    • tsc transpiles the typescript in braid into javascript
    • compose build braid builds the braid container based on the latest transpiled javascript files
    • comopose up -d builds the braid container based on the files in the braid folder, overriding the defaul braid build container

Building to Docker Hub

  • run ./build
  • when complete you'll see something like this Your new docker tag: yardstick/micro-services:braid-tagid
  • copy this tag id, and in the yardstick docker-compose.yml file change the image field to have the new tage, for example:
braid:
  image: yardstick/micro-services:braid-{add the new tag here}
  environment:
    VIRTUAL_HOST: ysbraid.localhost
    HTTPS_METHOD: noredirect
    VIRTUAL_PORT: 8443
  • once complete and confirmed to function, create a new PR for the measure repo, with the new tag and await ultimate judgement

Local Development

  • you can see if braid is running by typing in https://ysbraid.localhost:8443
  • to connect to braid you need to use the url wss://ysbraid.localhost:8443?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 you local console (app-console) with the following commands:
secret = "test"
payload = {
  :data => {
    :client => 'client name (mhs is only one implemented currently)',
    :client_type => 'site (only one in use rite now)',
    :user_id => (yardstick user id),
    :user_type => '(teacher/user)',
    :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 test your changes before pushing you can run npm test
Description
No description provided
Readme 11 MiB
Languages
TypeScript 94.5%
Makefile 3.1%
Dockerfile 2.1%
Shell 0.3%