Skip to content

Commit

Permalink
Working on chat.
Browse files Browse the repository at this point in the history
  • Loading branch information
RakhithaRR committed Mar 17, 2018
1 parent df5a70e commit daef88c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 62 deletions.
92 changes: 36 additions & 56 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ io.on('connection', (socket) => {
socket.on('chat', (msg) => {
// console.log(msg);
projRef.push(msg);
// projRef.orderByChild('date').limitToLast(1).on('child_added', (snapshot,prevKey) => {
// console.log('wewewewewew');
// // console.log(snapshot.val());
// io.emit(snapshot.val());
// });
io.emit('chat', msg)
projRef.once('child_added', (snapshot, prevKey) => {
console.log('wewewewewew');
console.log(snapshot.val());
io.emit('chat', snapshot.val());
});
// io.emit('chat', msg)
});


Expand Down

0 comments on commit daef88c

Please sign in to comment.