本地開發環境搭建
Closed this issue · 4 comments
sparanoid commented
config.js
是直接從 config.example.js
cp 來的,現在的問題是如何連上 Redis?可以用你們線上的嗎?
$ node --harmony rin
[Error: Module did not self-register.]
js-bson: Failed to load c++ bson extension, using pure JS version
Redis Error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
[Error: failed to connect to [127.0.0.1:27017]]
{ [Error: Command failed: /bin/sh -c pidof opentracker
/bin/sh: pidof: command not found
]
killed: false,
code: 127,
signal: null,
cmd: '/bin/sh -c pidof opentracker' }
Redis Error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis Error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis Error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
^C
phoenixlzx commented
tengattack commented
cache 配置中的 enable 可以设为 false,关闭 redis
数据库的话需要自己先装一个 mongodb
可以运行一下 bin/tools/import/bangumis.js 来获取到一份番組的数据(已经包含在所给出的数据中)
另外不是运行 rin.js,是 bin/rin-web.js (建议使用 iojs 运行)
tengattack commented
现在已经将测试数据提交 3ccec66
不过测试数据库里给出的番組数据较老,凤凰菊能帮忙导出一份线上的 tags 和 bangumis 的数据吗? @phoenixlzx
测试数据包含的测试帐号:
teng:123456
teng2:123456
teng3:123456
tengattack commented
另外附上我本机的测试用 nginx 配置:
server {
listen 80;
server_name localhost 0.0.0.0 bangumi.god.com;
root /home/teng/src/rin-pr/public;
charset utf8;
location ~ ^/(api|rss|download) {
proxy_pass http://127.0.0.1:3006;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
index index.html;
}
location /avatar {
rewrite /avatar/(.+) https://www.gravatar.com/avatar/$1 last;
}
}