Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Runtime Configurations

leopoldfreeman edited this page Apr 1, 2015 · 30 revisions

Here are the all runtime configurations of Pomelo.

masterConfig

This config can only be applied to master server.

authUser

  • Desc: The function to auth user.
  • Type: Function.
  • Default value: utils.defaultAuthUser from 'pomelo-admin'.

authServer

  • Desc: The function to auth server.
  • Type: Function.
  • Default value: utils.defaultAuthServerMaster from 'pomelo-admin'.

Example

app.configure('production|development', 'master', function(){
  app.set('masterConfig', {
    authUser: function () { ... },
    authServer: function () { ... }
  });
});

proxyConfig

The config affects the client of 'pomeo-rpc'. It can be applied to all servers.

bufferMsg

  • Desc: The function to auth user.
  • Type: Function.
  • Default value: Not set, which will be evaluated as false.

interval

  • Desc: See above. The unit is millisecond. Used when bufferMsg is true.
  • Type: Number.
  • Default value: 30.

Example

app.configure('production|development', function(){
  app.set('proxyConfig', {
    bufferMsg: true,
    interval: 20
  });
});
Clone this wiki locally