Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tv_panel
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hermod
tv_panel
Commits
c85611f6
Commit
c85611f6
authored
Feb 27, 2018
by
Julien Raspaud
Browse files
Options
Downloads
Patches
Plain Diff
Centralized WS port config
parent
004b5261
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
front/socket.js
+2
-1
2 additions, 1 deletion
front/socket.js
server/config.js
+7
-6
7 additions, 6 deletions
server/config.js
server/index.js
+5
-2
5 additions, 2 deletions
server/index.js
with
14 additions
and
9 deletions
front/socket.js
+
2
−
1
View file @
c85611f6
import
jsonToHtmlArray
from
'
./display
'
;
import
diffNodes
from
'
./diffNodes
'
;
import
{
port
}
from
'
../server/config
'
;
const
socketIO
=
io
.
connect
(
'
http://localhost:
3000/
'
);
const
socketIO
=
io
.
connect
(
`
http://localhost:
${
port
||
3000
}
/`
);
socketIO
.
on
(
'
connect
'
,
()
=>
{
socketIO
.
emit
(
'
date
'
);
...
...
This diff is collapsed.
Click to expand it.
server/config.js
+
7
−
6
View file @
c85611f6
const
fs
=
require
(
'
fs
'
);
const
path
=
require
(
'
path
'
);
const
fs
=
require
(
"
fs
"
);
Aymeric Bernard
@2015bernarda
·
Feb 27, 2018
Owner
Djou
Djou 😡
Please
register
or
sign in
to reply
const
path
=
require
(
"
path
"
);
module
.
exports
=
{
uuid
:
'
10
'
,
fontSize
:
'
80px
'
,
rowHeight
:
'
100px
'
,
cert
:
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
'
../key.pem
'
)),
port
:
5000
,
uuid
:
"
10
"
,
Aymeric Bernard
@2015bernarda
·
Feb 27, 2018
Owner
Djou
Djou 😡
Please
register
or
sign in
to reply
fontSize
:
"
80px
"
,
rowHeight
:
"
100px
"
,
cert
:
fs
.
readFileSync
(
path
.
resolve
(
__dirname
,
"
../key.pem
"
))
};
This diff is collapsed.
Click to expand it.
server/index.js
+
5
−
2
View file @
c85611f6
const
fetch
=
require
(
'
node-fetch
'
);
const
io
=
require
(
'
socket.io
'
)(
3000
);
const
{
uuid
,
fontSize
,
rowHeight
}
=
require
(
'
./config
'
);
const
{
uuid
,
fontSize
,
rowHeight
,
port
,
}
=
require
(
'
./config
'
);
const
io
=
require
(
'
socket.io
'
)(
port
||
3000
);
const
{
createSignedJWT
}
=
require
(
'
./utils
'
);
io
.
of
(
'
/
'
).
on
(
'
connection
'
,
(
socket
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment