隐藏自己 做好清理
一个可以实时匿名群聊的 web 服务。 特色是无需注册,每个人都可以删掉其他人说的话。
在你的 MySQL 中创建名为 perber
的数据库, 然后导入项目根目录中的 perber.sql。
在 /Peber/perber/ 中运行 npm install
,安装项目所需的包,当然运行 yarn
也可以。
修改 config-example.json
(位于目录: /Perber/perber/config/ 中) 为 config.json
修改 config.json
中的 mysqlConf
qiniuConfig
(前提是已经有了自己的 bucket_name, access_key 和 secret_key) 和 mailer
.
启动: node perber/app.js
在浏览器中访问 : http://localhost:6789 (默认端口为 6789)
redisConf
如果 redis 端口没改过,基本上保持默认就好
mysqlConf
设置你的 mysql host, port, user, password, database.
qiniuConfig
设置七牛
Perber 用到了 Qiniu 来存储图片, 你需要注册 Qiniu 来获得 "bucket_name" "access_key" 和 "secret_key"。
Qiniu Cloud Storage: http://www.qiniu.com/ Qiniu on Github: https://github.com/qiniu
qqMap
设置腾讯地图 API key: https://lbs.qq.com/guides/startup.html
mailer
用来发信的,可以写俩自己的邮箱
auth
暂时没有用到
session
设置 key 和 secret
app
设置服务运行的端口号(默认端口为 6789)、timer、limit
**app.timer:**
清理程序 sockets.js 里的cleaner() 的自动运行时间间隔,按分钟计算。
设为 1 ,则 1分钟运行一次。
**app.limit:**
在设定的 timer 时间范围内,每个在线用户最多能发多少信息。
theme
保持默认就行,目前只有 default 一种
debug : true | false
调试用的
目前只有一个,没什么用。
url: /api/v1/new
var data = { msg: "HAKULAMATATA test api" };
$.ajax({
url:'http://www.perber.com/api/v1/new',
contentType: 'application/json; charset=utf-8',
type: 'POST',
data : JSON.stringify(data)
})
apis.map.qq.com:腾讯地图 API,用于解析 ip, 显示所在城市或国家
xiamiRun:之前写的一个用来解析虾米音乐地址的服务 https://github.com/naoyeye/xiamiRun 不太稳定
http://www.douban.com/group/topic/45262966/
This code is distributed under the terms and conditions of the MIT license.