ponyplace is a 2d pony chatroom powered by node.js and WebSocket.
-
Make sure you have a
special-users.json
file in theserver/data_config
directory. Make sure the usernames listed have accounts attached, otherwise anyone can create one with that name and use mod powers. Should be of format:{ "joe": "creator", "fred": "moderator", "garry": "moderator", "tomatobot": "bot" }
-
You'll also need a
bypass.json
file inserver/data_config
. You can leave it empty ({}
), but if you have any bots, this allows them to bypass login via Persona, and instead use a password, e.g.:{ "somebot": "password123" }
-
Finally, set up a
config.json
file inserver/data_config
, to specify the port listened on for debugging and production modes, and the origins needed."allow_missing_origin"
, iftrue
, allows clients to connect which don't provide an origin (i.e. non-web browser clients like bots). It doesn't really matter what you set this to, though, since if they can avoid providing an origin, they can also probably fake one. For example:{ "origin": "http://pp.ajf.me", "origin_debug": "http://localhost:8000", "port": 8000, "port_debug": 8000, "allow_missing_origin": true }
- Obviously, make sure you have node.js.
cd
into theserver
directory and donpm install
. This is equivalent tonpm install websocket
to get WebSocket-Node (which itself requires node-gyp, dosudo npm install -g node-gyp
first),npm install keypress
to get the keypress module andnpm install express
to get express.- Make sure
server/data_user
is writeable. - Run
server.js
(add--debug
switch if running locally)
ponyplace no longer requires a separate web server. To integrate as part of a site using vhosts, run ponyplace on a different port and reverse-proxy.