From cc2aa67a4216ff28882aa40ace7a33407ef4df63 Mon Sep 17 00:00:00 2001 From: felipe <107950074+feliperosademendonca@users.noreply.github.com> Date: Tue, 11 Oct 2022 15:20:24 -0300 Subject: [PATCH 1/2] reativando sinc chat --- server.js | 8 ++------ tarefas.md | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/server.js b/server.js index 01f8d34de163..8cf43e8cf2c1 100644 --- a/server.js +++ b/server.js @@ -31,11 +31,7 @@ io.on('connection', socket => { }); -const PORT = process.env.PORT|| 5000; - -app.listen(PORT, () =>{ - console.log("listening on port "+PORT); -}) - + +app.listen(5000) \ No newline at end of file diff --git a/tarefas.md b/tarefas.md index e1b65818cec5..71f1bc73cb1b 100644 --- a/tarefas.md +++ b/tarefas.md @@ -1,11 +1,10 @@ ajustar a barra de rolagem lateral - Função desabilitar sons alertar que precisa ter um nickname para conversar no chat -ok! subir para o heroku para testar em uma hospedagem free +subir para o heroku para testar em uma hospedagem free (chat não funciona) ok! sons do whatsapp ou parecidos From 9c9554ee56afc301509025a488a587277f91d817 Mon Sep 17 00:00:00 2001 From: felipe <107950074+feliperosademendonca@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:12:06 -0300 Subject: [PATCH 2/2] corrigido o app.listen para server.listen --- public/index.html | 1 - public/scripts/message.js | 9 +++++++-- server.js | 7 +++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/public/index.html b/public/index.html index 288cf3034076..625d1deaf960 100644 --- a/public/index.html +++ b/public/index.html @@ -8,7 +8,6 @@ - diff --git a/public/scripts/message.js b/public/scripts/message.js index 6594a2b4b275..59da9db6a300 100644 --- a/public/scripts/message.js +++ b/public/scripts/message.js @@ -4,13 +4,17 @@ var socket = io ('http://localhost:5000'); function renderMessage(message){ - - if(message.id== "usuario"){ + + if(message.id== "usuario"){ + alert(message.id) + $('