Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최시원
/
Singer-Composer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Mukho
2021-11-25 20:24:19 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1f86430deee4a2d7a6b101a712358a5552e443ee
1f86430d
1 parent
ddef91b5
Update design
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
app.js
js/chat.js
readme.md
app.js
View file @
1f86430
...
...
@@ -90,7 +90,7 @@ io.sockets.on('connection', function(socket) {
console
.
log
(
logString
+
socket
.
name
+
' 님이 접속하였습니다.('
+
ip
+
')'
)
/* 모든 소켓에게 전송 */
io
.
sockets
.
emit
(
'update'
,
{
type
:
'connect'
,
name
:
'SERVER'
,
message
:
socket
.
name
+
'님이 접속하였습니다.'
})
io
.
sockets
.
emit
(
'update'
,
{
type
:
'connect'
,
message
:
socket
.
name
+
'님이 접속하였습니다.'
})
}
})
...
...
js/chat.js
View file @
1f86430
...
...
@@ -13,7 +13,7 @@ socket.on('update', function(data) {
var
chat
=
document
.
getElementById
(
'chat'
)
var
message
=
document
.
createElement
(
'div'
)
var
node
=
document
.
createTextNode
(
`
${
data
.
name
}
:
${
data
.
message
}
`
)
var
node
=
document
.
createTextNode
(
`
${
data
.
message
}
`
)
var
className
=
''
// 타입에 따라 적용할 클래스를 다르게 지정
...
...
readme.md
View file @
1f86430
...
...
@@ -61,7 +61,7 @@ create table board(
>UPDATE board SET idx = @COUNT:=@COUNT+1;
---
### 최종 수정: 2021-11-25 20:
1
4<br>
### 최종 수정: 2021-11-25 20:
2
4<br>
### 수정 내용:
1.
채팅 구현
2.
시간 실시간 반영
...
...
Please
register
or
login
to post a comment