config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * @Author HonorLee (dev@honorlee.me)
  3. * @Version 1.0 (2018-05-04)
  4. * @License MIT
  5. */
  6. global.Config = {
  7. //Server Setting | 服务器基本信息设置
  8. Server:{
  9. Name:'',
  10. Host:'',
  11. Port:8080
  12. },
  13. //Session Setting | Session配置
  14. Session:{
  15. //Session Expire Time min.
  16. SessionExpire : 30,
  17. //No expire while surfing
  18. AutoRefresh:true,
  19. //Session store type && Support 'File' or 'Memcache'
  20. //If using memcache,Memcache setting must be modified
  21. StoreType:'File'
  22. },
  23. //Asset setting
  24. Asset:{
  25. //Asset path
  26. asset_path : 'asset',
  27. upload_path : 'asset/upload',
  28. },
  29. Database:{
  30. Mysql:{
  31. on:false,
  32. host:'localhost',
  33. port:3306,
  34. user:'root',
  35. password:'',
  36. database:'',
  37. prefix:'',
  38. connectionLimit:10
  39. },
  40. Mongodb:{
  41. on:false,
  42. host:'localhost',
  43. port:27017,
  44. user:null,
  45. password:'',
  46. database:'',
  47. prefix:''
  48. },
  49. Memcache:{
  50. on:false,
  51. host:'localhost',
  52. port:11211
  53. },
  54. Redis:{
  55. on:false,
  56. host:'localhost',
  57. port:6379,
  58. prefix:null
  59. }
  60. },
  61. Wechat:{
  62. on:false,
  63. token:'',
  64. appId:'',
  65. appSecret:'',
  66. apiDomain:'api.weixin.qq.com',
  67. handler_path:'/wechat',
  68. StoreType:'File'
  69. },
  70. //If Debug on,log && info logs will output in console;except Error!
  71. debug:true,
  72. //if write file on,logs will write in log files
  73. write_log_file:false,
  74. write_error_file:true,
  75. //You can add your own config here
  76. };