Application can be accessed at: GuessWhat ###Prerequisites
###Installation
git clone https://github.com/NeenuAVarghese/guesswhat.git
cd guesswhat
npm install
Note: these node modules will be installed via package.json by npm
###Playing
cd guesswhat
npm start
ORforeman start
ORnf start
- Open web browser to
http://localhost:3000
- Repeat Step 3, for each client
Note: a Procfile is included for foreman
or nf
Note: if redis-server
and/or node
are not in your PATH
, then manually run
/path/to/redis-server
/path/to/node server/server.js
###Testing
- Install csslint (CSS validator)
- Install jshint (Javascript validator)
- Install tidy (HTML validator)
npm test
Note: validate.sh
is included with this project for testing
###Debugging Problem: Express will not start if port is already in use.
Option 1: Add a config.json
file
{
"httpPort": 8080
"redisPort": 7777
}
Option 2: Temporarily change the port number
redis-server
node server/server.js --httpPort <number>
Problem: Redis will not start if port is already in use.
Option 1: Kill the process(es)
lsof -i :6379
kill $(lsof -t -i :6379)
Option 2: Temporarily change the port number
redis-server --port <number>
node server/server.js --redisPort <number>
Problem: Redis DB has junk data
Option 1: Set an environmental variable
export purgeDB=true
Option 2: Use CLI interface
redis-server
redis-cli flushdb
Problem: API for socket.io has changed
Option 1: Print all properties of object "guesswhat"
console.log("====> DEBUG", Object.getOwnPropertyNames(guesswhat));
Option 2: Enable verbose debugging in nodejs
DEBUG=socket.io-parser node server/server.js
- Bootstrap - grid layout
- Font Awesome - icon font
- jQuery - simplify
lifeJavascript - Knockout - observe user typing with MVVM
- LiveStamp - auto-update elapsed times in chat
- Moment - convert UNIX timestamps to human-readable
- Montserrat - web font
- xss-filters - sanitize user input
###Licensing Copyright © 2016
GuessWhat is dual licensed under the MIT (aka X11) and GPLv2 licenses.