braid/README.md
2025-02-08 21:09:31 -08:00

20 lines
1.7 KiB
Markdown
Executable File

# BRAID v1.3.1
> Websocket server for the Measure platform
[![Build Status](https://semaphoreci.com/api/v1/projects/7767f0f3-4da6-4c84-9167-4db5402a3262/2573412/badge.svg)](https://semaphoreci.com/yardstick/braid)
[![Maintainability](https://api.codeclimate.com/v1/badges/bd7380e224b2df81f296/maintainability)](https://codeclimate.com/repos/5dc9919be9fca801620102e9/maintainability)
## Essential Information:
* braid uses [mocha (test framework)](https://www.npmjs.com/package/mocha), [chai (BDD/TDD assertion library)](https://www.npmjs.com/package/chai), [sinnon (spies, stubs, and mocks)](https://www.npmjs.com/package/sinon), [nyc (code coverage calculator)](https://www.npmjs.com/package/nyc) for our unit testing. Get aquainted with these packages to have a smooth unit testing experience.
* for schema management/validation, braid uses [joi](https://github.com/hapijs/joi/).
* For web sockets braid uses [ws](https://www.npmjs.com/package/ws)
* braid uses [typescript](https://www.npmjs.com/package/typescript) for our primary code development because of it's opinionated type management among other things. Get a good understanding of what typescript is, it's benifits, drawbacks, and dev flow
## Setting up
* install [npm](https://www.npmjs.com/get-npm)
* install typescript globally (`npm i -g typescript`). This is important because it is needed to transpile, so you can run your changes locally (using command `tsc`)
* run `npm install`
* download the braid repo into a folder in the same directory as the primary yardstick folder
* 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