M src/classes/ChatServer.ts => src/classes/ChatServer.ts +1 -1
@@ 28,7 28,7 @@ export class ChatServer {
ChatServer.app = express();
//Setting up Express routes
- ChatServer.app.use('/', express.static(__dirname + '/../public'));
+ ChatServer.app.use('/', express.static(config.websiteDir));
if(debug){
ChatServer.server = ChatServer.app.listen(port, ()=>{
M src/classes/ChatUser.ts => src/classes/ChatUser.ts +5 -3
@@ 58,9 58,11 @@ export class ChatUser {
//command parse
if(parsedMsg.body === ChatUser._search){
//user has requested to search for other users
-
- if(debug) log("debug", "command parse > search request")
- this.setState(ChatUser.LOOKING);
+ //user must be CONNECTED or DISCONNECTED???
+ if(this.state === ChatUser.CONNECTED || this.state === ChatUser.DISCONNECTED){
+ if(debug) log("debug", "command parse > search request")
+ this.setState(ChatUser.LOOKING);
+ }
} else if(parsedMsg.body === ChatUser._disconnect){
//user has requested to disconnect
//user must be either PAIRED or LOOKING
M src/config.json => src/config.json +2 -1
@@ 3,5 3,6 @@
"debug": false,
"websitedomain": "lowf.codes",
"logDir": "",
- "reportDir": ""
+ "reportDir": "",
+ "websiteDir": ""
}