Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1137 commits
Select commit Hold shift + click to select a range
dade9e7
fix #461
Ricardo-Li Nov 26, 2014
7f2f74e
Merge pull request #462 from Ricardo-Li/master
alsotang Nov 26, 2014
71abc56
jiankongbao
alsotang Dec 1, 2014
84cb169
Merge remote-tracking branch 'origin/master'
alsotang Dec 1, 2014
e195be5
qiniu link event 7
alsotang Dec 3, 2014
8fac982
little fix
alsotang Dec 6, 2014
06e700b
fix #464 。post /accesstoken 返回 id
alsotang Dec 8, 2014
9ee7384
防止 mongodb 注入
alsotang Dec 8, 2014
5a30fd6
little fix
alsotang Dec 9, 2014
2cd21b4
little fix
alsotang Dec 9, 2014
c9aa5ce
fix #465
alsotang Dec 11, 2014
3613643
fix test
alsotang Dec 11, 2014
64dc50a
qiniu 8
alsotang Dec 15, 2014
b692c76
coding.net
alsotang Dec 17, 2014
734bbb0
teambition
alsotang Dec 19, 2014
26accbb
teambition 换链接
alsotang Dec 19, 2014
74a78e4
teambition retina
alsotang Dec 19, 2014
cdb44a6
little fix
alsotang Dec 22, 2014
924e606
little fix
alsotang Dec 31, 2014
f02f72d
little fix
alsotang Dec 31, 2014
41eb18e
hotfix
alsotang Dec 31, 2014
08e7934
去掉 dnspod 的统计
alsotang Jan 3, 2015
92dfae1
去掉 github 用户信息展示
alsotang Jan 3, 2015
b06e570
histarter
alsotang Jan 4, 2015
c552604
在关于页面增加了移动客户端的相关信息
lanceli Jan 6, 2015
3587bca
用 markdown-it 代替 remarkable. fix #440 #468
alsotang Jan 11, 2015
b7fc9de
样式微调
alsotang Jan 11, 2015
a207a0c
Merge pull request #471 from lanceli/master
alsotang Jan 12, 2015
f8abad6
remove ads from master
alsotang Jan 15, 2015
13aa74c
staticFile
alsotang Jan 15, 2015
3544fba
delete unused imgs
alsotang Jan 15, 2015
a4ac304
延迟检测上传文件的时间
alsotang Jan 15, 2015
03c12a9
文案
alsotang Jan 19, 2015
0595333
add cnzz analytics
alsotang Jan 20, 2015
5194f62
use `//` protocol
alsotang Jan 20, 2015
f7fe243
hide cnzz ad
alsotang Jan 20, 2015
0c82a8e
always use referer
alsotang Jan 20, 2015
b8da6b8
允许用户通过 github 更改 email
alsotang Jan 20, 2015
f1d1be2
fix tests
alsotang Jan 21, 2015
415d028
api 页面文案
alsotang Jan 22, 2015
cef8eb9
增加极光推送
lanceli Jan 25, 2015
eb06862
判断是否配置了极光推送
lanceli Jan 27, 2015
56a2398
Merge remote-tracking branch 'lanceli/master'
alsotang Jan 27, 2015
8d3de7c
little fix
alsotang Jan 27, 2015
bc292bd
callback 有默认值
alsotang Jan 27, 2015
96e5215
区分推送环境
lanceli Jan 27, 2015
716a6a5
Merge pull request #475 from lanceli/master
alsotang Jan 27, 2015
8890b81
文案
alsotang Jan 27, 2015
abde0a4
github 登陆不再修改 loginname
alsotang Feb 4, 2015
bd7bf58
重复替换 at 用户名的问题,fix #481
alsotang Feb 4, 2015
8026c8d
fix #479, show user avatar and name together
feitian124 Feb 4, 2015
cf4163a
make reply action icons larger so easy to click
feitian124 Feb 4, 2015
053ac64
样式微调
alsotang Feb 5, 2015
118e759
avatar
alsotang Feb 6, 2015
22f3c7c
use node 0.12.x
alsotang Feb 7, 2015
fa0d40f
升级最大可用内存
alsotang Feb 7, 2015
5147db8
update mongoose to 3.9.7
alsotang Feb 7, 2015
dde34ac
update newrelic to 1.16.1
alsotang Feb 7, 2015
c214462
degrade mongoose to 3.8.23
alsotang Feb 7, 2015
10967b3
update `moment` to 2.9.0
alsotang Feb 7, 2015
6d206c6
test travis on 0.12
alsotang Feb 7, 2015
ba70f44
package.json, private: true
alsotang Feb 8, 2015
68fd34c
update bcrypt and xmlbuilder
alsotang Feb 8, 2015
4a0683c
pm2 maxmemory 300M
alsotang Feb 8, 2015
cd8b8bc
test for iojs
alsotang Feb 8, 2015
63a8811
在页面右侧增加客户端下载二维码
lanceli Feb 8, 2015
3fa3f0a
样式优化
alsotang Feb 8, 2015
a52a0fe
更清晰的二维码
alsotang Feb 13, 2015
a9eba1a
hotfix qrcode
alsotang Feb 13, 2015
96faae0
fix #487 回复消息时,不 at 消息作者
alsotang Feb 14, 2015
ddfff93
加上官方微博链接
alsotang Feb 28, 2015
e1c09fa
增加主题收藏的相关接口
lanceli Feb 28, 2015
070a676
增加iojs-logo,并增加到友情链接最下面
i5ting Mar 1, 2015
a0485cc
增加主题收藏 test case
lanceli Mar 1, 2015
427ccfa
Merge pull request #489 from lanceli/master
alsotang Mar 1, 2015
400089a
修复 get start 失效 link
fengmk2 Mar 2, 2015
0638e82
Merge pull request #492 from cnodejs/fix-link
alsotang Mar 2, 2015
0dd6b1b
Merge remote-tracking branch 'i5ting/490-fix'
alsotang Mar 2, 2015
a417374
使用 150 * 50 的图片
alsotang Mar 2, 2015
51b2e33
去掉 jpush 的日志
alsotang Mar 2, 2015
bfcec5e
fix test
alsotang Mar 2, 2015
8f12b20
fix test again
alsotang Mar 2, 2015
9fc1102
fix title-height
Ricardo-Li Mar 4, 2015
24da558
Merge pull request #494 from Ricardo-Li/master
alsotang Mar 4, 2015
896360e
增加一条配置步骤
Matrixbirds Mar 5, 2015
0e31215
fix issue #496 editor 文字样式印象
Matrixbirds Mar 5, 2015
4c9c365
fix issue #496 editor 样式
Matrixbirds Mar 5, 2015
a7a9e02
Merge pull request #497 from Matrixbirds/master
alsotang Mar 6, 2015
1ab4b01
update readme
alsotang Mar 6, 2015
c73b415
write mongod version into readme.md
alsotang Mar 6, 2015
dec699b
prevent dou m
magicdawn Mar 6, 2015
8bb99fb
Merge pull request #498 from magicdawn/dou-m
alsotang Mar 6, 2015
4361b50
update readme
alsotang Mar 6, 2015
c95b67a
update readme
alsotang Mar 6, 2015
e790c57
pm2 --max-memory-restart 400M
alsotang Mar 6, 2015
ca0bc3c
update node.js version in readme
alsotang Mar 7, 2015
3d0ed71
update readme nodejs version
alsotang Mar 7, 2015
0bd5556
按钮的样式
alsotang Mar 8, 2015
307a967
按钮对齐
alsotang Mar 8, 2015
bb0a002
add user cache
alsotang Mar 12, 2015
e7bad5a
add expire time for user cache
alsotang Mar 12, 2015
436c992
Revert "add expire time for user cache"
alsotang Mar 12, 2015
c7f19cb
Revert "add user cache"
alsotang Mar 12, 2015
affb633
提高 router 寻址效率
alsotang Mar 15, 2015
00381f3
不自动记录所在 tab
alsotang Mar 15, 2015
138a576
管理员可以删除评论
alsotang Mar 16, 2015
79effea
fix #499
alsotang Mar 16, 2015
b7956bd
修复测试
alsotang Mar 16, 2015
3333b39
fix #500 。主题可被锁定
alsotang Mar 17, 2015
9bfad11
jpush 参数错误
alsotang Mar 19, 2015
8448993
将置顶和精华的 icon 样式反转
alsotang Mar 21, 2015
8f4b890
Merge pull request #1 from cnodejs/master
DavidCai1111 Mar 24, 2015
c68b0e0
屏蔽用户处文案
alsotang Mar 28, 2015
3f1574b
邮箱提取规则
alsotang Apr 3, 2015
8d62408
avatar 通过服务器代理访问
alsotang Apr 4, 2015
67c0982
两项改进
alsotang Apr 4, 2015
4ab2d4c
fix 缓存无效问题
alsotang Apr 4, 2015
8836cf9
代理 ga 文件
alsotang Apr 4, 2015
2582533
去掉每日访问限制
alsotang Apr 4, 2015
2e7e416
更准确的 ratelimit 计数
alsotang Apr 4, 2015
e4a1886
软删除
alsotang Apr 4, 2015
5bd4331
安装步骤中加入 redis
alsotang Apr 4, 2015
70b16c3
config.default.js 中加入更多注解
alsotang Apr 4, 2015
c6915f6
ratelimit key 顺序
alsotang Apr 4, 2015
30f42cd
api 接口软删除展示问题
alsotang Apr 4, 2015
1977a63
解决 at 重复问题
alsotang Apr 6, 2015
825a932
api topic 支持取精华帖
alsotang Apr 7, 2015
4a8b88f
500 错误记录
alsotang Apr 8, 2015
aa1a278
Merge pull request #2 from cnodejs/master
DavidCai1111 Apr 8, 2015
b03495b
fix err handler
alsotang Apr 9, 2015
a67a2c2
add redis version to readme.md
alsotang Apr 9, 2015
b6b0af6
更友好的 ratelimit 提示
alsotang Apr 10, 2015
06b2cd2
fix ratelimit test
alsotang Apr 11, 2015
1e8fd6d
add checkmark
alsotang Apr 11, 2015
f2be30e
typo
alsotang Apr 11, 2015
91ff12b
更新未读消息ui
alsotang Apr 13, 2015
fc282e7
update pm2
alsotang Apr 15, 2015
042559c
Merge pull request #3 from cnodejs/master
DavidCai1111 Apr 16, 2015
a511357
最大可用内存 600M
alsotang Apr 17, 2015
39b296e
Merge pull request #4 from cnodejs/master
DavidCai1111 Apr 19, 2015
f6ff838
删除回复后更新对应帖子的last_reply
DavidCai1111 Apr 20, 2015
25544b1
Merge pull request #517 from DavidCai1993/master
alsotang Apr 20, 2015
7e696d7
调整格式
alsotang Apr 20, 2015
778ede2
零回复的主题不显示招聘栏目
alsotang Apr 23, 2015
8be2e14
topic 详情页缓存零回复主题
alsotang Apr 23, 2015
b2d4ba4
update readme
alsotang Apr 29, 2015
b7ac06b
update readme
alsotang Apr 29, 2015
0f6cc14
mongodb 注入漏洞
alsotang May 5, 2015
5e6cdd6
fix travis
alsotang May 5, 2015
f7b9a10
update pm2 to 0.12.13
alsotang May 6, 2015
c47dd08
内存 > 400M后,重启
alsotang May 12, 2015
4544dcc
use bcrypt 0.8.3
alsotang May 12, 2015
4fa0c5c
Ensure current_user always has defined.
huacnlee May 22, 2015
128bf75
the max parameter has been deprecated
halfcrazy May 22, 2015
5e87478
tidy code
huacnlee May 23, 2015
57635a7
Same name style for views vars;
huacnlee May 23, 2015
1618b21
增加 BaseModel,用 mongoose plugin 的方式为每个 Model 扩展 static, instance 函数;
huacnlee May 23, 2015
bb72c5f
current_user fix test
huacnlee May 23, 2015
53b2a37
给 Response 扩展 render404, renderError 函数,替代之前重复 render 错误页面的代码;
huacnlee May 23, 2015
7cb8205
对齐等号赋值
huacnlee May 23, 2015
2c5feb6
controllers/topic.js 对齐等号赋值;
huacnlee May 23, 2015
e004301
修正代码,之前理解错误了;
huacnlee May 23, 2015
f56343f
Merge pull request #527 from halfcrazy/fix-pm2
alsotang May 24, 2015
858ecbe
fix #528
alsotang May 24, 2015
d34bd0c
Fix typo
huacnlee May 25, 2015
43d9de2
Route methods use lowerCamelCase style
huacnlee May 25, 2015
a459c0b
Add logger;
huacnlee May 25, 2015
1091b36
Newline first in request log
huacnlee May 25, 2015
6bdcffc
Fix typo duartion -> duration
huacnlee May 25, 2015
e01fdf5
RequestLog skip avatar request
huacnlee May 25, 2015
93531ec
Logger write to file (info, warn, error)
huacnlee May 25, 2015
1869473
Add mongoose query log
huacnlee May 25, 2015
7357d65
Update error_page comments
huacnlee May 25, 2015
b2cc230
Request log completed info on Response finish event
huacnlee May 25, 2015
20bc1e1
Green color for request log duration
huacnlee May 25, 2015
e924cce
Add view render log
huacnlee May 25, 2015
88dbbdf
Add Cache execute duration log;
huacnlee May 25, 2015
828437c
Don't stdout log, when config.debug = false or run test env
huacnlee May 25, 2015
fe730d8
Add make run command to run development server
huacnlee May 25, 2015
cf185ed
merge master
huacnlee May 25, 2015
0126383
Merge branch 'master' into request-log
huacnlee May 25, 2015
15c9768
Mongoose log add runtime, use mquery TraceFunction (So that need new …
huacnlee May 25, 2015
1069481
Cache log duration remove ()
huacnlee May 25, 2015
3d72bd0
Remove unused require
huacnlee May 25, 2015
c1ef713
Logger will check ./log exist on require, if not exist create one.
huacnlee May 25, 2015
4e928d7
继续改进代码写法
alsotang May 27, 2015
d8b3cc9
NODE_ENV
alsotang May 27, 2015
acd1626
Merge commit 'c1ef713a863eaf3000048233b540ce35c44ac42b'
alsotang May 27, 2015
c11b5a5
common/logger.js 在不需要打印时,不进行任何计算
alsotang May 27, 2015
de05b2d
update newrelic
alsotang May 27, 2015
505b6b9
打印 mongodb 日志
alsotang May 28, 2015
77a958c
上传文件只能单选
alsotang May 28, 2015
11352cf
修正 getTopicsByQuery 的查询,避免无谓的多条 Topic find by id 对数据库带来多余的开销;
huacnlee May 28, 2015
677ce4f
Merge branch 'master' into improve-db-query
huacnlee May 28, 2015
5f1a543
remove unsed require
huacnlee May 28, 2015
e676d68
fix #533. /agent add 304 strategy
alsotang May 28, 2015
58645c7
Fix getTopicsByQuery, 修正排序,last_reply 获取;
huacnlee May 29, 2015
88206c5
Merge branch 'master' into improve-db-query
huacnlee May 29, 2015
adde0de
优化通知的查询方式;
huacnlee May 29, 2015
c4b83d6
rubychina
alsotang May 29, 2015
5e0467a
use special test db
huacnlee May 29, 2015
2dcb9b0
Merge remote-tracking branch 'huacnlee/improve-db-query'
alsotang May 30, 2015
e73e1b5
缺失作者topic处理
alsotang May 30, 2015
7af10cb
bodyparser limit
alsotang Jun 5, 2015
9c9e65d
Update config.default.js
msdlisper Jun 17, 2015
881f17a
qiniu domain
alsotang Jun 17, 2015
e2863f0
fix #541. avoid clickjacking
alsotang Jul 1, 2015
5426982
reformat code
alsotang Jul 1, 2015
183fed2
Revert "reformat code"
alsotang Jul 1, 2015
1292e50
提问的智慧
alsotang Jul 3, 2015
fe3abad
invalid message
alsotang Jul 3, 2015
56a96e5
update nodejs version
alsotang Jul 7, 2015
7afe1a8
update pm2 to 0.14.3
alsotang Jul 7, 2015
f8a0ced
README 线上运行环境 Node.js -> io.js
albin3 Jul 11, 2015
05ae0b7
Merge pull request #545 from albin3/pullrequest
alsotang Jul 13, 2015
1bd6134
正则改进
alsotang Jul 17, 2015
46427bc
fix #546
alsotang Jul 21, 2015
307e8a7
去掉无用索引
alsotang Aug 4, 2015
3ae1612
订正数据库,精简 user is_block 的查询逻辑
alsotang Aug 4, 2015
599359f
add fast-js to getstart
alsotang Aug 7, 2015
ff2c6d2
use travis container
alsotang Aug 7, 2015
7cfc018
fix test
alsotang Aug 7, 2015
86699eb
pages number cache fix
alsotang Aug 7, 2015
f13ec3b
去掉收藏功能
alsotang Aug 7, 2015
a3cc328
mongodb poolSize 20
alsotang Aug 7, 2015
6f7e33b
qiniu uploadURL comment
alsotang Aug 8, 2015
f1b164e
add node weekly to getstart
alsotang Aug 10, 2015
c11cc36
改进代理访问的逻辑
alsotang Aug 10, 2015
2898c83
upgrade mongoose to 4.1.2, and pass tests on mongodb 3.0.5
alsotang Aug 11, 2015
2a8b645
适应 wiredtiger 的重复 key 报错
alsotang Aug 11, 2015
308d5b8
推荐云主机
alsotang Aug 12, 2015
3b35dd6
云主机移动至底部
alsotang Aug 12, 2015
253320a
sponsor页面透出 linode && digitalocean
alsotang Aug 12, 2015
b104a87
不代理访问封锁地址
alsotang Aug 11, 2015
5430fd4
使用未被封锁的 gravatar 域名
alsotang Aug 11, 2015
27ad50c
gravatar 使用 https
alsotang Aug 12, 2015
f983564
fix test
alsotang Aug 12, 2015
d7dca79
将用户头像代理逻辑,从 model 中迁移至 view 中
alsotang Aug 12, 2015
996bf7c
当点赞数至少为 3 时,才高亮
alsotang Aug 12, 2015
264d5a2
更新《提问的智慧》链接
alsotang Aug 26, 2015
f92f929
Node.js 新手入门 seo
alsotang Aug 27, 2015
bd29a35
同上
alsotang Aug 27, 2015
957804e
remove unused property
alsotang Aug 27, 2015
35cbb52
修复不支持的 ejs 用法
alsotang Aug 27, 2015
fd6b447
fix `schema.methods.updated_at_ago`
alsotang Sep 1, 2015
1310305
`updated_at_ago` to `update_at_ago`
alsotang Sep 1, 2015
57d7236
remove unnecessary escape
alsotang Sep 2, 2015
dbfc4cf
nodejs 4.0
alsotang Sep 9, 2015
9f78333
use g++4.8
alsotang Sep 13, 2015
677514a
add iojs
alsotang Sep 13, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 21 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
config.js
.cov
coverage
node_modules
.naeindex
public/user_data
coverage.html
.monitor

*.min.*.js
*.min.*.css
assets.json

# Ignore Mac OS desktop services store
.DS_Store

# Ignore Windows desktop setting file
desktop.ini

*.log

.idea
public/upload/*

*.sublime-project
*.sublime-workspace
*.swp
11 changes: 6 additions & 5 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"before",
"beforeEach",
"after",
"should",
"rewire",
"afterEach",
"ace",
"$"
],

"browser": true,
"node" : true,
"node": true,
"es5": true,
"bitwise": true,
"curly": true,
Expand All @@ -39,5 +39,6 @@
"indent": 2,
"expr": true,
"multistr": true,
"onevar": false
}
"onevar": false,
"unused": "vars"
}
2 changes: 0 additions & 2 deletions .naeignore

This file was deleted.

31 changes: 28 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
sudo: false

language: node_js

env:
- CXX=g++-4.8

node_js:
- 0.6
- 0.8
- '0.10'
- '0.12'
- 'iojs'
- '4'

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

services:
- mongodb
- mongodb
- redis

before_install:
- $CXX --version

script: make test-cov

after_success: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

22 changes: 0 additions & 22 deletions AUTHORS

This file was deleted.

Binary file modified History.md
Binary file not shown.
20 changes: 0 additions & 20 deletions LICENSE

This file was deleted.

63 changes: 45 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,52 @@
TESTS = $(shell find test -type f -name "*.js")
TESTTIMEOUT = 5000
REPORTER = spec
JSCOVERAGE = ./node_modules/visionmedia-jscoverage/jscoverage
PROJECT_DIR = $(shell pwd)

test:
@npm install
TESTS = $(shell find test -type f -name "*.test.js")
TEST_TIMEOUT = 5000
MOCHA_REPORTER = spec
# NPM_REGISTRY = "--registry=http://registry.npm.taobao.org"
NPM_REGISTRY = ""


all: test

install:
@npm install $(NPM_REGISTRY)

pretest:
@if ! test -f config.js; then \
cp config.default.js config.js; \
fi
@if ! test -d public/upload; then \
mkdir public/upload; \
fi

test: install pretest
@NODE_ENV=test ./node_modules/mocha/bin/mocha \
--reporter $(REPORTER) --timeout $(TESTTIMEOUT) $(TESTS)
--reporter $(MOCHA_REPORTER) \
-r should \
-r test/env \
--timeout $(TEST_TIMEOUT) \
$(TESTS)

test-cov cov: install pretest
@NODE_ENV=test node \
node_modules/.bin/istanbul cover --preserve-comments \
./node_modules/.bin/_mocha \
-- \
-r should \
-r test/env \
--reporter $(MOCHA_REPORTER) \
--timeout $(TEST_TIMEOUT) \
$(TESTS)

build:
@./node_modules/loader/bin/build views .

run:
@node app.js

cov:
@rm -rf ../nodeclub-cov
@$(JSCOVERAGE) --encoding=utf-8 --exclude=node_modules --exclude=public --exclude=test ./ ../nodeclub-cov
@cp -rf ./node_modules ./test ./public ../nodeclub-cov
start: install build
@NODE_ENV=production nohup ./node_modules/.bin/pm2 start app.js -i 0 --name "cnode" --max-memory-restart 400M >> cnode.log 2>&1 &

test-cov: cov
@$(MAKE) -C $(PROJECT_DIR)/../nodeclub-cov test REPORTER=progress
@$(MAKE) -C $(PROJECT_DIR)/../nodeclub-cov test REPORTER=html-cov > coverage.html
@$(MAKE) test REPORTER=markdown > test_results.md
restart: install build
@NODE_ENV=production nohup ./node_modules/.bin/pm2 restart "cnode" >> cnode.log 2>&1 &

.PHONY: test test-cov cov
.PHONY: install test cov test-cov build run start restart
139 changes: 38 additions & 101 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,123 +1,60 @@
# nodeclub

[![Build Status](https://secure.travis-ci.org/cnodejs/nodeclub.png?branch=master)](http://travis-ci.org/cnodejs/nodeclub)

基于nodejs的社区系统
Nodeclub
=

[![build status][travis-image]][travis-url]
[![Coverage Status][coverage-image]][coverage-url]
[![David deps][david-image]][david-url]
[![node version][node-image]][node-url]

[travis-image]: https://img.shields.io/travis/cnodejs/nodeclub.svg?style=flat-square
[travis-url]: https://travis-ci.org/cnodejs/nodeclub
[coverage-image]: https://img.shields.io/coveralls/cnodejs/nodeclub.svg?style=flat-square
[coverage-url]: https://coveralls.io/r/cnodejs/nodeclub?branch=master
[david-image]: https://img.shields.io/david/cnodejs/nodeclub.svg?style=flat-square
[david-url]: https://david-dm.org/cnodejs/nodeclub
[node-image]: https://img.shields.io/badge/node.js-%3E=_0.10-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/

## 介绍

Node Club 是用 **Node.js** 和 **MongoDB** 开发的新型社区软件,界面优雅,功能丰富,小巧迅速,
已在Node.js 中文技术社区 [CNode](http://cnodejs.org) 得到应用,但你完全可以用它搭建自己的社区。
Nodeclub 是使用 **Node.js** 和 **MongoDB** 开发的社区系统,界面优雅,功能丰富,小巧迅速,
已在Node.js 中文技术社区 [CNode(http://cnodejs.org)](http://cnodejs.org) 得到应用,但你完全可以用它搭建自己的社区。

## 安装部署

```bash
// install node npm mongodb
// run mongod
$ npm install
$ cp config.default.js config.js
// modify the config file as yours
$ node app.js
```
*不保证 Windows 系统的兼容性*

## TEST
线上跑的是 [io.js](https://iojs.org) v2.3.3,[MongoDB](https://www.mongodb.org) 是 v2.6,[Redis](http://redis.io) 是 v2.8.9。

```bash
$ make test
```

jscoverage

```bash
$ make test-cov
1. 安装 `Node.js/io.js[必须]` `MongoDB[必须]` `Redis[必须]`
2. 启动 MongoDB 和 Redis
3. `$ make install` 安装 Nodeclub 的依赖包
4. `cp config.default.js config.js` 请根据需要修改配置文件
5. `$ make test` 确保各项服务都正常
6. `$ node app.js`
7. visit `http://localhost:3000`
8. done!
```

* test results: [test_results.md](https://github.com/cnodejs/nodeclub/blob/master/test_results.md)
* jscoverage: [**31%**](http://fengmk2.github.com/coverage/nodeclub.html)

## 其它

小量修改了两个依赖模块:node-markdown,express

* node-markdown/lib/markdown.js
## 测试

allowedTags 添加:

```
embed //支持 flash 视频
table|thead|tbody|tr|td|th|caption //支持表格
```

allowedAttributes 添加:
跑测试

```
embed:'src|quality|width|height|align|allowScriptAccess|allowFullScreen|mode|type'
table: 'class'
```bash
$ make test
```

* express/node_modules/connect/lib/middleware/csrf.js 添加:
跑覆盖率测试

```javascript
if (req.body && req.body.user_action === 'upload_image') return next();
```bash
$ make test-cov
```

## 关于pull request

从现在开始,所有提交都要严格遵循[代码规范](https://github.com/windyrobin/iFrame/blob/master/style.md)。

## Authors
## 贡献

Below is the output from `git-summary`.

```
project: nodeclub
commits: 201
active : 81 days
files : 267
authors:
94 fengmk2 46.8%
20 Jackson Tian 10.0%
15 dead-horse 7.5%
13 jiyinyiyong 6.5%
10 Kenny Zhao 5.0%
9 muyuan 4.5%
7 young40 3.5%
6 aisk 3.0%
6 Lei Zongmin 3.0%
5 ericzhang 2.5%
4 spout 2.0%
3 Json Shen 1.5%
2 chang 1.0%
1 张洋 0.5%
1 LeToNode 0.5%
1 leizongmin 0.5%
1 roymax 0.5%
1 sunwenchao 0.5%
1 thebrecht 0.5%
1 Xiang Gao 0.5%
```
有任何意见或建议都欢迎提 issue,或者直接提给 [@alsotang](https://github.com/alsotang)

## License

( The MIT License )

Copyright (c) 2012 muyuan, fengmk2 and other nodeclub contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT
Loading