@@ -147,6 +147,8 @@ something gets updated on one of them, how do we reflect this change on the othe
147
147
Answer: all devices "* subscribe* " to the change event and receive the latest
148
148
values as a result.
149
149
150
+
151
+
150
152
If you don't get * overwhelmed* by lots of new words and want a sneak peek
151
153
at the all the cool commands you can use in Redis check: http://redis.io/commands
152
154
But we're getting * ahead of ourselves* , lets focus on the basics first.
@@ -177,19 +179,68 @@ then there's ***only one*** place to store your data.
177
179
178
180
## How?
179
181
180
- (A Tutorial using Redis with Node.js)
182
+ ### First Learn the * Fundamentals *
181
183
182
184
*** First thing*** you need to do - if you haven't already - is *** go through*** the
183
- *** online tutorial*** : http://try.redis.io/
185
+ *** online tutorial*** : http://try.redis.io/ (30mins to learn and take notes)
186
+
187
+ #### Make Sure you * Understand*
188
+
189
+ + [ ** SET** ] ( http://redis.io/commands/set ) - SET a key value pair: ` SET server:name "fido" `
190
+ + [ ** GET** ] ( http://redis.io/commands/get ) - GET the value of a key: ` GET server:name => "fido" `
191
+ + [ ** INCR** ] ( http://redis.io/commands/incr ) increment a counter (* integer* )
192
+ and [ ** DECR** ] ( http://redis.io/commands/decr ) decrement a counter (decremented key needs to already exist)
193
+ ``` sh
194
+ redis> SET count 10
195
+ redis> INCR count
196
+ (integer) 11
197
+ redis> DECR count
198
+ (integer) 10
199
+ ```
200
+ + [ ** EXPIRE** ] ( http://redis.io/commands/expire ) means you can delete data after a specified amount of time.
201
+ e.g: expire a key after 10 seconds
202
+ ``` sh
203
+ redis> SET mykey " Hello"
204
+ OK
205
+ redis> EXPIRE mykey 10
206
+ (integer) 1
207
+ redis> TTL mykey
208
+ (integer) 10
209
+ # wait for 10 seconfds then
210
+ ```
211
+ + ** Lists** - A list is a series of ordered values (comparable to an Array in JS)
212
+ + [ ** RPUSH** ] ( http://redis.io/commands/rpush )
213
+ + [ ** LPUSH** ] ( )
214
+ + [ ** LRANGE** ] ( )
215
+
216
+ ``` sh
217
+ RPUSH fruits " Apple"
218
+ RPUSH fruits " Banana"
219
+ LPUSH fruits " Mango"
220
+ LRANGE fruits 0 -1 => 1) " Mango" , 2) " Apple" , 3) " Banana"
221
+ LRANGE fruits 0 1 => 1) " Mango" , 2) " Apple"
222
+ LRANGE fruits 1 2 => 1) " Apple" , 2) " Banana"
223
+ LLEN fruits => 3
224
+ ```
225
+ + ** Sets** -
226
+
227
+ (A Tutorial using Redis with Node.js)
228
+
229
+ ### Installation
184
230
231
+ > The suggested way of installing Redis is compiling it from sources as Redis has no dependencies other than a working GCC compiler and libc.
232
+ > Quick Start: http://redis.io/topics/quickstart
233
+ > However for people * stuck* on Windows (if you don't already have a C Compiler),
234
+ we * recommend* using Vagrant
185
235
186
- ## Using Redis Commander to View/Set your Data
236
+ ### Using Redis Commander to View/Set your Data
187
237
238
+ For people who prefer a
188
239
https://github.com/joeferner/redis-commander
189
240
190
241
191
242
192
- #### Alternatives
243
+ #### Alternative GUIs
193
244
194
245
+ Redis Desktop Manager https://github.com/uglide/RedisDesktopManager (a desktop app)
195
246
+ List of others: https://redislabs.com/blog/so-youre-looking-for-the-redis-gui
0 commit comments