config.prod.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. 'use strict';
  2. // 开发服务-生产环境
  3. module.exports = appInfo => {
  4. const config = (exports = {});
  5. // 数据库设置
  6. config.dbName = 'point_shopping';
  7. config.mongoose = {
  8. url: `mongodb://127.0.0.1:27017/${config.dbName}`, // 120.48.146.1 127.0.0.1
  9. options: {
  10. user: 'admin',
  11. pass: 'admin',
  12. authSource: 'admin',
  13. useNewUrlParser: true,
  14. useCreateIndex: true,
  15. useFindAndModify: true,
  16. },
  17. };
  18. // redis设置
  19. config.redis = {
  20. client: {
  21. port: 6379, // Redis port
  22. host: '127.0.0.1', // Redis host
  23. password: '123456',
  24. db: 1,
  25. },
  26. };
  27. // mq设置
  28. config.amqp = {
  29. client: {
  30. hostname: '127.0.0.1',
  31. username: 'tehq',
  32. password: 'tehq',
  33. vhost: 'tehq',
  34. },
  35. app: true,
  36. agent: true,
  37. };
  38. // 定时任务机制设置
  39. config.taskMqConfig = {
  40. ex: 'task',
  41. queue: 'task',
  42. routingKey: 'tr',
  43. deadEx: 'deadTask',
  44. deadQueue: 'deadTaskQueue',
  45. deadLetterRoutingKey: 'deadTr',
  46. };
  47. config.logger = {
  48. level: 'NONE',
  49. };
  50. return {
  51. ...config,
  52. };
  53. };