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
b4801c29
authored
Oct 10, 2019
by
Alexander Bazo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make path to client a passable server argument
parent
084add1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
index.js
+2
-1
package.json
+1
-1
No files found.
index.js
View file @
b4801c29
...
...
@@ -12,6 +12,7 @@ const http = require("http"),
var
app
=
express
(),
server
=
http
.
createServer
(
app
),
pathToClient
=
process
.
argv
[
2
],
gameServer
;
// Logger.enable();
...
...
@@ -29,7 +30,7 @@ gameServer.define(Config.getGameRoomName(), StarGazerRoom);
app
.
use
(
Config
.
getSocialRoute
(),
socialRoutes
);
app
.
use
(
Config
.
getMonitorRoute
(),
monitor
(
gameServer
));
// Prrobably shoud be set after game server is created
app
.
use
(
Config
.
getGameRoute
(),
express
.
static
(
Config
.
getGamePath
()
,
{
app
.
use
(
Config
.
getGameRoute
(),
express
.
static
(
pathToClient
,
{
maxAge
:
100
}));
...
...
package.json
View file @
b4801c29
...
...
@@ -4,7 +4,7 @@
"description"
:
"npm init template for bootstraping an empty Colyseus project"
,
"main"
:
"index.js"
,
"scripts"
:
{
"start"
:
"node index.js"
,
"start"
:
"node index.js
../StarGazerClient/build
"
,
"loadtest"
:
"colyseus-loadtest loadtest/example.js --room my_room --numClients 2"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
...
...
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