Просмотр исходного кода

add old readme, still has relevant info.

Lucas Stadler лет назад: 11
Родитель
Сommit
b0135efd2a
1 измененных файлов с 32 добавлено и 0 удалено
  1. 32 0
      js/babl/README.md

+ 32 - 0
js/babl/README.md

@ -0,0 +1,32 @@
1
# babl
2
3
a simple, web-based chat server using websockets.
4
5
## ideas
6
7
* starting out should be as easy as possible
8
    - start with a purely client-side bot/script
9
        * who will answer on the client? the logged in user or a
10
          user-specific bot?
11
    - use same api on server
12
        * still, some things aren't possible on the client (unrestricted
13
          http requests, file writing or custom protocols)
14
* would be cool to support images & youtube videos via the same
15
  (client-side) api, possibly even audio or canvas?
16
* don't want to reinvent security, protocols... is it possible to use
17
  hubot? (setup is quite complex, need to understand quite a few
18
  different parts)
19
20
## api playground
21
22
here are some ideas how the api could look.
23
24
    // client-side
25
    var chat = document.querySelector("#chat");
26
27
    babl.on('connection', function(conn) {
28
        conn.on('message', function(msg) {
29
            var display_msg = msg.user + "(" + msg.timestamp + "): " + msg.text;
30
            chat.textContent += display_msg + "\n";
31
        });
32
    });