Skip to content

Commit 214b4ef

Browse files
committed
功能描述
1 parent b4a966f commit 214b4ef

File tree

4 files changed

+24
-37
lines changed

4 files changed

+24
-37
lines changed

README.md

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,30 @@
1-
stock
2-
=====
1+
功能:
32

4-
stock01
3+
1. 股票页面聊天室功能:
4+
a. 聊天室以股票为单位,同一个用户可以进入多个股票的聊天室进行聊天
5+
b. 聊天记录可以设置缓存数量,默认为20条,如果超过20条会存储到数据库中,当聊天室中没有用户也会将聊天内容存入数据库中
56

6-
11.13
7-
ejs部署
7+
聊天室代码:
8+
https://github.com/tangguangyao/stock/blob/master/models/socket.js
89

9-
12.19
10-
前台基本功能完善
1110

12-
具体股票页面聊天室功能,聊天记录能存储
11+
2. 微博类似的话题,评论,回复,转发功能,前端使用angularjs绑定实现
1312

14-
微博类似的话题,评论,回复,转发功能
13+
3. 页面实时交互,包括关注股票,关注用户功能
1514

16-
股票页面能查看讨论这个股票的话题
15+
4. 股票页面能查看讨论这个股票的话题
1716

18-
个人页面能查看我关注的用户的话题,关注股票的相关话题,我的话题,@我的话题
17+
5. 个人页面能查看我关注的用户的话题,关注股票的相关话题,我的话题,@我的话题
1918

19+
6. 加入grunt管理代码,引入uglify压缩代码,jshint检测代码规范,watch监听代码变化
2020

21-
angularjs和seajs 混用感觉不怎么好,去掉seajs了
21+
7. 使用mocha检测后端代码
22+
检测代码在test中
23+
总结mocha单元测试经验
24+
http://hi.baidu.com/tang_guangyao/item/302a9d1a9976c06ae65e0643
2225

23-
加入grunt
26+
8. 加入async流程控制,对于需要多次回调查询数据库的进行重构
2427

25-
12.20 用jshint规范单元测试
28+
9. 尝试bigpige,首页利用bigpipe,加载热门股票和热门用户,并且和angular结合使用
2629

27-
qunit前端单元测试
28-
mocha后端单元测试
29-
30-
总结mocha单元测试经验
31-
http://hi.baidu.com/tang_guangyao/item/302a9d1a9976c06ae65e0643
32-
33-
数据库对应模块单元测试完成
34-
35-
加入async,对于需要多次回调查询数据库的进行重构
36-
37-
使用外网免费数据库https://app.mongohq.com
38-
39-
测试部署分支
40-
41-
尝试bigpige
42-
43-
首页利用bigpipe,加载热门股票和热门用户,并且和angular结合使用
30+
10. 使用外网免费数据库https://app.mongohq.com

test/models/user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('models user', function(){
1919
setTimeout(function () {
2020
user.save(function (err, _user) {});
2121
user2.save(function (err, _user) {});
22-
},50);
22+
},100);
2323
});
2424
//删除测试用户
2525
after(function () {
@@ -39,7 +39,7 @@ describe('models user', function(){
3939
user.admin.should.equal(100);
4040
done();
4141
});
42-
},60);
42+
},110);
4343
});
4444

4545
it('get name empty', function (done) {

test/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//test models 数据库接口
66

77
var topic=require('./models/user');
8-
// var topic=require('./models/topic');
9-
// var topic=require('./models/stoc');
10-
// var topic=require('./models/room');
8+
var topic=require('./models/topic');
9+
var topic=require('./models/stoc');
10+
var topic=require('./models/room');
1111

1212
//test rount 路由
1313

views/top.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
<script src="/socket.io/socket.io.js"></script>
1616
</head>
17-
<body ng-app="App">
17+
<body >

0 commit comments

Comments
 (0)