Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gfnork node.js workshop Lesson #5 node.js datab...
Search
gfnork
June 20, 2014
Programming
0
460
gfnork node.js workshop Lesson #5 node.js databases
Redis, NoSQL, MongoDB, drivers
gfnork
June 20, 2014
Tweet
Share
More Decks by gfnork
See All by gfnork
Basic Mobile Application Design
freundschaft
0
500
gfnork node.js workshop Lesson #1 JavaScript Basics
freundschaft
0
930
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
930
gfnork node.js workshop Lesson #3 node.js basics
freundschaft
0
460
gfnork node.js workshop Lesson #4 middleware for node
freundschaft
0
490
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
450
Other Decks in Programming
See All in Programming
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
590
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
620
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
720
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
570
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
50
32k
PipeCDのプラグイン化で目指すところ
warashi
1
230
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
600
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
370
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
320
RailsGirls IZUMO スポンサーLT
16bitidol
0
130
WindowInsetsだってテストしたい
ryunen344
1
220
Featured
See All Featured
KATA
mclloyd
30
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
How to Ace a Technical Interview
jacobian
277
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Unsuck your backbone
ammeep
671
58k
How STYLIGHT went responsive
nonsquared
100
5.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Transcript
None
2
3
4
5
6
7 http://redis.io/download
8
9
10 Import the redis driver make an Instance of a
connection
11
12 Insert Command Value Callback Key
13
14 Load Command Key Callback
15
16
17
18
19
20
21 Node 1 Primary Node 1 Secondary Node 1 Secondary
22 Node 1 Node 1 Secondary Node 1 Secondary Election
23 Node 1 Node 1 Node 1 Secondary Primary
24 Node 1 Node 1 Secondary Node 1 Secondary Primary
25
26 a c d Shard1 b e Shard2
27 a c1 d Shard1 b e Shard2 c2
28 a c1 d Shard1 b e Shard2 c2
29 mongod mongod mongod Replica Set mongod mongod mongod Replica
Set mongod mongod mongod Replica Set mongod mongod mongod Config Servers mongos Client
30
31 http://www.mongodb.org/downloads
32
33
34
35
36
37
38
39 assigning Connection to db import Connectiong to db Host
Adress Port Database Name
40
41 Get a Collection Collection Name Insert Command A Java
Script Object Callback
42
43
44
45 Returns a Collection Search Command Converts a Cursor to
an Array
46 Returns a single Object can be used like any
other Object
47
48
49 import Connectiong to db Host Adress Port Database Name
assigning Connection to Variable db
50 assigning Connection to Variable db
51
52 Reactiong to Event Event Name Handling Error Where the
Ountput gets piped to String attached to Error Message
53
54 Event that will only be done once Event Name
55
56 Schema Name Mongoose Object Function for defining Schemas Variables
57
58 Model Name Function for creating Models Model Name Schema
Name
59
60
61
62 Creating new Instance of Model JS Object matching Schema
63
64 Function for saving
65
66
67
68 Returns An Array of Objects
69
70
71
72 Key Searches Objects with the Name 'Geek' and returns
the Value for the Key 'skills'
73
74
75
76
77 Get a Collection Command for making Indexes Name of
the Key that has to be indexed 1 = Ascending 2 = Descending
78
79
80
81
82
83
84
85
86
87