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
devsho
2021-11-26 16:35:59 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
93c81f0188e1c460fdb785f4a6bc55ccac296fec
93c81f01
2 parents
2befeb6d
a071ea18
Merge branch 'master' of
http://khuhub.khu.ac.kr/2017104034/Singer-Composer
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
app.js
js/chat.js
readme.md
router/board/index.js
app.js
View file @
93c81f0
...
...
@@ -24,7 +24,7 @@ var LocalStrategy = require('passport-local').Strategy
var
session
=
require
(
'express-session'
)
var
flash
=
require
(
'connect-flash'
)
var
path
=
require
(
'path'
)
const
PORT
=
300
3
const
PORT
=
300
0
var
jsdom
=
require
(
'jsdom'
);
const
{
JSDOM
}
=
jsdom
;
...
...
@@ -74,6 +74,7 @@ var session = session({
app
.
use
(
session
);
var
sharedsession
=
require
(
"express-socket.io-session"
);
const
{
createSocket
}
=
require
(
'dgram'
)
io
.
use
(
sharedsession
(
session
,
{
autoSave
:
true
}));
app
.
use
(
passport
.
initialize
())
...
...
js/chat.js
View file @
93c81f0
...
...
@@ -16,7 +16,8 @@ socket.on('update', function(data) {
var
node
;
if
(
data
.
name
!=
"SERVER"
){
node
=
document
.
createTextNode
(
`
${
data
.
name
}
:
${
data
.
message
}
`
)
}
else
{
}
else
{
node
=
document
.
createTextNode
(
`
${
data
.
message
}
`
)
}
var
className
=
''
...
...
readme.md
View file @
93c81f0
...
...
@@ -70,8 +70,9 @@ create table comment(
>UPDATE board SET idx = @COUNT:=@COUNT+1;
---
### 최종 수정: 2021-11-26
04:42
<br>
### 최종 수정: 2021-11-26
16:26
<br>
### 수정 내용:
0.
채팅 중 서버 재시작시 기존 참여자들 리셋시키기 이슈
1.
채팅 구현
2.
시간 실시간 반영
3.
프로필 사진 추가
...
...
router/board/index.js
View file @
93c81f0
...
...
@@ -147,6 +147,7 @@ router.post('/read/commentwrite', function(req,res,next){
board
.
query
(
sql
,
datas
,
function
(
err
,
row
){
if
(
err
)
console
.
error
(
"err : "
+
err
);
})
console
.
log
(
logString
+
req
.
user
.
ID
+
'('
+
nickname
+
') 유저가 '
+
idx
+
'번 게시물에 댓글을 작성했습니다.('
+
ip
+
')'
)
res
.
redirect
(
'/board/read/'
+
idx
);
})
...
...
Please
register
or
login
to post a comment