OgarProject / Ogar

An open source Agar.io server implementation, written with Node.js.
Other
719 stars 822 forks source link

Allow non-interactive mode #690

Open aanno opened 7 years ago

aanno commented 7 years ago

Currently ogar is spawning a asyncconsole. When I try to start it with no TTY attached

/usr/bin/node src/index.js </dev/null

the following error appears:

TypeError: this.stdin.setRawMode is not a function at new AsyncConsole (/home/ogar/Ogar/node_modules/asyncconsole/index.js:24:12) at Timeout._onTimeout (/home/ogar/Ogar/src/index.js:50:17) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5)

This is because setRawMode is only available for TTYs (see https://github.com/nodejs/node-v0.x-archive/issues/8204)

Please allow to start ogar non-interactive, i.e. without an asyncconsole.

Luka967 commented 7 years ago

Use this version of the index.js.

Andrews54757 commented 7 years ago

@aanno Actually, there is a mode. Do node index.js --noconsole