Skip to content

NeenuAVarghese/guesswhat

Repository files navigation

guesswhat

Application can be accessed at: GuessWhat ###Prerequisites

###Installation

  1. git clone https://github.com/NeenuAVarghese/guesswhat.git
  2. cd guesswhat
  3. npm install

Note: these node modules will be installed via package.json by npm

###Playing

  1. cd guesswhat
  2. npm start OR foreman start OR nf start
  3. Open web browser to http://localhost:3000
  4. 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

  1. Install csslint (CSS validator)
  2. Install jshint (Javascript validator)
  3. Install tidy (HTML validator)
  4. 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

  1. redis-server
  2. node server/server.js --httpPort <number>

Problem: Redis will not start if port is already in use.

Option 1: Kill the process(es)

  1. lsof -i :6379
  2. kill $(lsof -t -i :6379)

Option 2: Temporarily change the port number

  1. redis-server --port <number>
  2. 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

  1. redis-server
  2. 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

Client-side libraries

###Licensing Copyright © 2016

GuessWhat is dual licensed under the MIT (aka X11) and GPLv2 licenses.

About

No description or website provided.

Topics

Resources

License

MIT, GPL-2.0 licenses found

Licenses found

MIT
LICENSE
GPL-2.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published