|
|
5 tahun lalu | |
|---|---|---|
| src | 5 tahun lalu | |
| systemd-unit | 5 tahun lalu | |
| .gitattributes | 5 tahun lalu | |
| .gitignore | 5 tahun lalu | |
| LICENSE.md | 5 tahun lalu | |
| README.md | 5 tahun lalu | |
| TODO | 5 tahun lalu | |
| client.js | 5 tahun lalu | |
| package-lock.json | 5 tahun lalu | |
| package.json | 5 tahun lalu | |
| pkg.sh | 5 tahun lalu | |
| tsconfig.json | 5 tahun lalu |
Simple communication bridge between clients and telegram. Using sockets is simple way for other clients to send notification. Current version support only one way communication (from client to telegram) but it should be possible to implement registering command. Protocol is based on queue where elements are separated with semicolons.
npm install
npm run build
npm start
Reply with "<id>&<auth>"
register;Test App;
Reply with "OK" on success or "ERR" with message;
login;PIZS-4681-bKUp-2154;
Need authentication Reply with "OK" on success or "ERR" with message;
notify; test notification;
Reply with pong
ping;
Reply with closing message and close connection
close;
Server in: register;Test App;close;
Server out: 5&GSFBT-665-oJDDKqerYCWwfmtFWOOD;
Server in: login;EDSPG-466-VlyoDV9i6mBOAwle0hZU;ping;notify;Test;close;
Server out: OK;pong;OK;Closing connection;
Server in: login;invalid-code;
Server out: ERR;auth unmatched or not activated;
Server in: notify;notify without login;
Server out: ERR;need to be logged;