-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtodo.txt
140 lines (107 loc) · 4.07 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
add gulp to delint, minify, and uglify code and assets
deliver assets from cdn?
add sharing twitter and facebook sharing
improve SEO
make it styled more like trello with questions filling in to the right
if you have two comments open, newComment.text is in all input fields
teach users to use the app more
- what is it for
- how to vote
- features, sort by vote_count, etc
track when users join or leave rooms and the # of users
on $locationChangeStart - emit leaving.room, '/:room_name' - if listener is in room, decrement
on $locationChangeSuccess - emit joining.room, '/:room_name' - if listener is in room, incrememnt
upon arriving in a room . . . how many people are there?
create Room model and track userCount there
$scope.$on('$locationChangeStart', function(event, next, current) {
if(current_user.is_logged_in){
var route_object = ($route.routes[$location.path()]).route_object; //This is how you get it
if(!(route_object.route_roles)){
event.preventDefault();
}
}
});
$scope.userCount = 0;
// USER ENTERS THE ROOM
$scope.$on('socket:broadcast.user_connected', function (event, data) {
console.log(data);
if (data == $scope.room.name) {
$scope.userCount = ++$scope.userCount;
}
});
// USER LEAVES THE ROOM
$scope.$on('socket:broadcast.user_disconnected', function (event, data) {
console.log(data);
if (data.room_name == $scope.room.name) {
}
});
track how many cookies your questions get per session
track ids of questions client asks
when they are voted up, give you a cookie, voted down, take a cookie away
vote up/down flashes the question
deploy to AWS
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_console.html
Make Ionic app gobble up that JSON and have socket.io
scale:
on broadcast, only publish if room_name === room_name - not scalable! and every client is recieving every question across the whole system . . .
add grunt package.json and include grunt files in git
unify cookie and add maxAge of 7200000
upgrade angular to 1.4.x
if (!$cookies.questionCookie) {
var questionCookie = {
vup_ids: [],
vdp_ids: []
}
$cookies.putObject('questionCookie', $scope.questionCookie, {'expires': 7200000});
} else {
$scope.questionCookie = JSON.parse($cookies.questionCookie)
}
console.log(JSON.parse($cookies.questionCookie))
Finnegan:
make socket-based website Express, Mongodb, Socket-io
make finnegan
paragraphs > words
upgrade to bcrypt with salt and hash passwords http://stackoverflow.com/questions/17201450/salt-and-hash-password-in-nodejs-w-crypto
DONE Add Jade
DONE add partials
DONE npm install nodemon --save
DONE add socket.io
DONE angular route to templates
DONE create post
DONE vote up
DONE vote down
DONE separate rooms
DONE start on room-index.jade
DONE navigate to /:roomName
DONE limit post-index to see only questions in room
DONE send room_name with post
express cookie fetcher
var vdp_ids = JSON.parse(req.cookies.voted_down_post_ids)
console.log(vdp_ids.indexOf(2343) > -1);
vote only once -- (good test!)
vote_up / down
DONE add post_id to voted_up_posts cookie object
DONE if post_id in vdp_id, do not allow another vote up
DONE on socket:broadcast.vote_down
DONE if already voted - vote up/down then vote up/down +/- 2 (update on server)
DONE highlight if you voted
DONE downcase room hashtag
DONE make SPA - collapse the two views
DONE sort by vote
DONE allow links
DONE make enter => exit button
DONE disable spacebar in room.name
DONE add ngTouch
DONE voted to -5 = destroy
DONE display questions created at with nice '1m' notation
DONE Need cookies turned on . . .
DONE style comments a bit better
DONE make comments appear
DONE don't connect until in room
DONE join rooms
DONE count connected users
DONE emmit only to that room
DONE leave room - update connection count
DONE fix mobile responsive
DONE add footer