This application return in real time indexes to a graphic that can be ploted by any frontend client
(to know more about husky: https://typicode.github.io/husky/#/)
$ yarn build
$ yarn prepare
$ yarn start
(to know more about nodemon: https://nodemon.io/)
$ yarn dev
$ yarn test
(know more in: https://jestjs.io/docs/cli)
$ yarn test:watch
$ yarn test:coverage
(know more in: https://docs.docker.com/get-started/ and https://docs.docker.com/compose/gettingstarted/)
$ docker-compose up
To build a container and then start automatically
graphic-generator
├─ .circleci
│ └─ config.yml
├─ .dockerignore
├─ .editorconfig
├─ .eslintignore
├─ .eslintrc.json
├─ .gitignore
├─ .prettierrc.json
├─ Dockerfile
├─ README.md
├─ docker-compose.yml
├─ jest.config.js
├─ nodemon.json
├─ package.json
├─ src
│ ├─ common
│ │ └─ environment-consts.ts
│ └─ services
│ ├─ graphic-generator-service.ts
│ ├─ interfaces
│ │ └─ interfaces.ts
│ └─ ws-server.ts
│ ├─ index.ts
├─ tests
│ ├─ graphic-generator-service.spec.ts
│ └─ ws-server.spec.ts
├─ tsconfig-build.json
├─ tsconfig.json
├─ yarn-error.log
└─ yarn.lock
To use in dev environment just run this command
$ yarn dev
Then, use some request client as Insomnia, Postman or any you prefer. In this exemple i used insomnia. In your client, create a new websocket request and put the port and url setted up in your project copy
Now click in connect and a message of success will be returned down bellow
With the client properly connect, you can send the message and the application will return the indexes
If you wanna stop the process or close connection, just send "close" in body message and the connection will be ended