octachrome / treason

A clone of the card game Coup written in Node.js
Other
138 stars 79 forks source link

Add instructions to running the game locally #6

Closed einsteinsfool closed 7 years ago

einsteinsfool commented 7 years ago

Hi.

I forked your repo because I saw some bad decisions of AI and I wanted to fix them. So I ran:

npm install
node server.js

...and I got this error:

(node:378) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: not initialized
Failed to initialise database(s)
{ Error: connect ECONNREFUSED 127.0.0.1:5984
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 5984 }

I guess I have to set up the database since the port 5984 is closed on my machine. Could you add some instructions in your manual how to do that?

octachrome commented 7 years ago

I have updated the readme. It's as simple as installing CouchDB.

einsteinsfool commented 7 years ago

That didn't work for me. Could you add to the Readme that in case some body had problems they could do:

# npm install -g pouchdb-server
$ pouchdb-server --port 5984

That finally worked in my case.

octachrome commented 7 years ago

In what sense did it not work? Did couchdb fail to install? What platform are you using?

einsteinsfool commented 7 years ago

I installed couchdb successfully but on OpenSUSE from unofficial repo. So after the installation something could be not set up like on Ubuntu. I still got the same error probably because ports 5984 and 8080 were closed (checked with nmap). Perhaps there's a command to open some port for couchdb but I don't know it.

octachrome commented 7 years ago

I've updated the readme again.