<commit_before>/*
*
*
 https://www.websequencediagrams.com/

 title Tattler
 User->Php: Get WS, set sessionId
 note right of User: ajax
 note left of Php: remember sessionId
 User->Ws: connect
 note left of Ws: get socketId
 User->Php: send rooms request + socketId + sessionId
 note right of User: ajax
 note left of Php: validate rooms access
 Php->Ws: store sessionId+socketId, make rooms
 Ws->User: join rooms
 User->Ws: dance

* */


var app = module.exports = module.parent.exports.setAppDefaults();

app.callbacks = require('./controllers/index');
app.socket = require('./models/tattler');

// routes
app.get('/', app.callbacks.getRoot);
app.get('/rooms', app.callbacks.getRooms);
app.post('/rooms', app.callbacks.postRooms);

app.post('/emit', app.callbacks.postEmit);
app.get('/emit', app.callbacks.getEmit);<commit_msg>uml update<commit_after>/*
*
*
 https://www.websequencediagrams.com/

 http://www.websequencediagrams.com/cgi-bin/cdraw?lz=dGl0bGUgVGF0dGxlcgogVXNlci0-UGhwOiBHZXQgV1MsIHNldCBzZXNzaW9uSWQKIG5vdGUgcmlnaHQgb2YAKwU6IGFqYXgAEwdsZWYAFAUAPgVyZW1lbWJlcgA0DABcBldzOiBjb25uZWN0ACoPV3M6IGdldCBzb2NrZXQAKAoAgQ8Fc2VuZCByb29tcyByZXF1ZXN0ICYmACIJAAcFAHQ2dmFsaWRhdGUAVgdhY2Nlc3MKIFBocACBJgZzdG9yZQCBfQoAagwsIG1hawAyBwCBUwxzdWJzY3JpYmUgdG8AFghXcy0-AIItBmpvaW4AZQhsbG93ZWQgYnkgUGhwAIIWDGRhbmNl&s=default

 title Tattler
 User->Php: Get WS, set sessionId
 note right of User: ajax
 note left of Php: remember sessionId
 User->Ws: connect
 note left of Ws: get socketId
 User->Php: send rooms request && socketId && sessionId
 note right of User: ajax
 note left of Php: validate rooms access
 Php->Ws: store sessionId && socketId, make rooms
 User->Ws: subscribe to rooms
 Ws->User: join rooms allowed by Php
 User->Ws: dance

* */


var app = module.exports = module.parent.exports.setAppDefaults();

app.callbacks = require('./controllers/index');
app.socket = require('./models/tattler');

// routes
app.get('/', app.callbacks.getRoot);
app.get('/rooms', app.callbacks.getRooms);
app.post('/rooms', app.callbacks.postRooms);

app.post('/emit', app.callbacks.postEmit);
app.get('/emit', app.callbacks.getEmit);
{'fraction_non_alphanumeric': 0.12723845428840716, 'fraction_numerical': 0.015551366635249765, 'mean_word_length': 5.452887537993921, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1965234', 'n_tokens_mistral': 873, 'n_tokens_neox': 833, 'n_words': 159}