Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Eye-Tracking Classroom
/
StarGazer-Server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f660c13c
authored
Oct 08, 2019
by
Alexander Bazo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor
parent
d01e10a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
index.js
+4
-8
lib/rooms/StarGazerRoom.js
+0
-1
No files found.
index.js
View file @
f660c13c
...
...
@@ -4,9 +4,9 @@ const cors = require("cors");
const
colyseus
=
require
(
"colyseus"
);
const
monitor
=
require
(
"@colyseus/monitor"
).
monitor
;
const
socialRoutes
=
require
(
"@colyseus/social/express"
).
default
;
const
StarGazerRoom
=
require
(
"./lib/rooms/StarGazerRoom"
);
const
port
=
process
.
env
.
PORT
||
2567
;
const
app
=
express
()
const
app
=
express
();
const
StarGazerRoom
=
require
(
"./lib/rooms/StarGazerRoom"
);
app
.
use
(
cors
());
app
.
use
(
express
.
json
());
...
...
@@ -14,16 +14,12 @@ app.use(express.json());
const
server
=
http
.
createServer
(
app
);
const
gameServer
=
new
colyseus
.
Server
({
server
:
server
,
express
:
app
,
express
:
app
});
// register your room handlers
gameServer
.
define
(
"star_gazer_lab"
,
StarGazerRoom
);
// register @colyseus/social routes
gameServer
.
define
(
"star_gazer_lab"
,
StarGazerRoom
);
app
.
use
(
"/"
,
socialRoutes
);
// register colyseus monitor AFTER registering your room handlers
app
.
use
(
"/colyseus"
,
monitor
(
gameServer
));
gameServer
.
listen
(
port
);
...
...
lib/rooms/StarGazerRoom.js
View file @
f660c13c
...
...
@@ -33,7 +33,6 @@ class StarGazerRoom extends colyseus.Room {
}
update
(
deltaTime
)
{
console
.
log
(
"in: update"
);
this
.
state
.
update
(
deltaTime
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment