memdb.conf.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Copyright 2015 The MemDB Authors.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  12. // implied. See the License for the specific language governing
  13. // permissions and limitations under the License. See the AUTHORS file
  14. // for names of contributors.
  15. 'use strict';
  16. module.exports = {
  17. backend : {
  18. engine : 'mongodb',
  19. url : 'mongodb://localhost/memdb-test',
  20. },
  21. locking : {
  22. host : '127.0.0.1',
  23. port : 6379,
  24. db : 1,
  25. },
  26. slave : {
  27. host : '127.0.0.1',
  28. port : 6379,
  29. db : 1,
  30. },
  31. log : {
  32. level : 'WARN',
  33. },
  34. promise : {
  35. longStackTraces : false,
  36. },
  37. collections : {
  38. player : {
  39. indexes : [
  40. {
  41. keys : ['areaId'],
  42. valueIgnore : {
  43. areaId : ['', -1],
  44. },
  45. },
  46. {
  47. keys : ['deviceType', 'deviceId'],
  48. unique : true,
  49. },
  50. ]
  51. }
  52. },
  53. shards : {
  54. s1 : {
  55. host : '127.0.0.1',
  56. port : 32017,
  57. },
  58. s2 : {
  59. host : '127.0.0.1',
  60. port : 32018,
  61. },
  62. },
  63. };