11var config = { } ;
22config . development = {
3- //数据库配置
3+ // Config for database, only support mysql.
44 db : {
55 username : "root" ,
66 password : null ,
77 database : "codepush" ,
88 host : "127.0.0.1" ,
99 dialect : "mysql"
1010 } ,
11- //七牛云存储配置 当storageType为qiniu时需要配置
11+ // Config for qiniu (http://www.qiniu.com/) cloud storage when storageType value is "qiniu".
1212 qiniu : {
1313 accessKey : "" ,
1414 secretKey : "" ,
1515 bucketName : "" ,
16- downloadUrl : "" //文件下载域名地址
16+ downloadUrl : "" // Binary files download host address.
1717 } ,
18- // conf for s3
18+ // Config for Amazon s3 (https://aws.amazon.com/cn/s3/) storage when storageType value is "s3".
1919 s3 : {
2020 bucketName : process . env . BUCKET_NAME ,
2121 region : process . env . REGION ,
22- downloadUrl : process . env . DOWNLOAD_URL ,
22+ downloadUrl : process . env . DOWNLOAD_URL , // binary files download host address.
2323 } ,
24- //文件存储在本地配置 当storageType为local时需要配置
24+ // Config for local storage when storageType value is "local".
2525 local : {
26+ // Binary files storage dir, Do not use tmpdir and it's public download dir.
2627 storageDir : "/Users/tablee/workspaces/storage" ,
27- //文件下载地址 CodePush Server 地址 + '/download' download对应app.js里面的地址
28- downloadUrl : "http://localhost:3000/download"
28+ // Binary files download host address which Code Push Server listen to. the files storage in storageDir.
29+ downloadUrl : "http://localhost:3000/download" ,
30+ // public static download spacename.
31+ public : '/download'
2932 } ,
3033 common : {
31- //登录jwt签名密钥,必须更改,否则有安全隐患,可以使用随机生成的字符串
34+ // jwt sign secret for auth. you have to modify it for security. use random string instead it.
3235 loginSecret : "CodePushServer" ,
33- //当天登录密码错误尝试次数,超过次数帐户将会锁定。0:表示无限制,可能会出现暴力破解。 大于0:必须开启redis服务。
36+ /*
37+ * tryLoginTimes is control login error times to avoid force attack.
38+ * if value is 0, no limit for login auth, it may not safe for account. when it's a number, it means you can
39+ * try that times today. but it need config redis server.
40+ */
3441 tryLoginTimes : 0 ,
35- //CodePush Web部署地址,也可以配置成CodePush Web地址
36- //codePushWebUrl: "http://localhost:3001",
37- //差异化更新版本生成数目 默认为3
42+ // CodePush Web(https://github.com/lisong/code-push-web) login address.
43+ //codePushWebUrl: "http://localhost:3001/login ",
44+ // create patch updates's number. default value is 3
3845 diffNums : 3 ,
39- //数据目录,优化选项
46+ // data dir for caclulate diff files. it's optimization.
4047 dataDir : "/Users/tablee/workspaces/data" ,
41- //选择存储类型,目前支持local和qiniu配置
48+ //storageType which is your binary package files store. options value is ("local" | "qiniu" | "s3")
4249 storageType : "local"
4350 } ,
44- //邮件配置,注册模块验证邮箱需要使用 参考https ://github.com/nodemailer/nodemailer
51+ //config for smtp email,register module need validate user email project source https ://github.com/nodemailer/nodemailer
4552 smtpConfig :{
4653 host : "smtp.mxhichina.com" ,
4754 port : 465 ,
@@ -51,7 +58,7 @@ config.development = {
5158 pass : ""
5259 }
5360 } ,
54- //配置redis, 注册时需要, 登录限制密码出错次数
61+ //config for redis (register module, tryLoginTimes module)
5562 redis : {
5663 default : {
5764 host : "127.0.0.1" ,
0 commit comments