0.0.3 • Published 9 years ago

vox-server v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Postvox Server

This is a basic implementation of a Postvox server. It implements (most of) the Postvox protocol. It stores its data on local disk. It doesn't do any fancy clustering.

It can be found running in the wild at http://vanilla.postvox.net.

Running in production

$ export DEBUG='vox:*'
$ export NODE_ENV='production'
$ node vox-server.js \
    --dbDir=/path/to/dir \
    --port=9001 \
    --metricsPort=9002

or

Modify pm2-process.json and:

$ pm2 start pm2-process.json
$ pm2 logs

Running in development

$ export DEBUG='vox:*'
$ export NODE_ENV='development'
$ # TODO: run fakehub
$ node vox-server.js \
    --dbDir=/path/to/dir \
    --port=9001 \
    --metricsPort=9002

Using nodemon is very convenient for development:

$ npm install -g nodemon
$ nodemon vox-server.js <flags>

Flags

NameExampleDescription
--dbDir/home/user/vox-server-dbThe on-disk location of the server's database. This is where message streams and metadata will be stored.
--port9001The port to bind to.
--metricsPort9002The port to bind the internal metrics server to.
--hubUrlhttp://hub.postvox.netThe URL of the Hub. The Hub is like DNS, but for users' nicknames. If you point to a different Hub, you also need to update the expected public key in vox-common/authentication.js.

TODO

  • [] Implement the rest of the protocol.
  • [] Make it easy to run fakehub in development mode.