Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
gfnork node.js workshop Lesson #5 node.js datab...
Search
gfnork
June 20, 2014
Programming
490
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
gfnork node.js workshop Lesson #5 node.js databases
Redis, NoSQL, MongoDB, drivers
gfnork
June 20, 2014
Transcript
87 slides
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
More Decks by gfnork
See All by gfnork
Basic Mobile Application Design
freundschaft
0
540
gfnork node.js workshop Lesson #1 JavaScript Basics
freundschaft
0
1k
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
1k
gfnork node.js workshop Lesson #3 node.js basics
freundschaft
0
480
gfnork node.js workshop Lesson #4 middleware for node
freundschaft
0
530
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
480
Other Decks in Programming
See All in Programming
AI Augmentation Techniques with Liberty
ivargrimstad
1
570
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
700
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
880
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
imagewebp()の向こう側: WebPはなぜ JPEG・PNGより軽いのか
yuzneri
0
150
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
280
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
340
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
480
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
350
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
KATA
mclloyd
PRO
35
16k
WCS-LA-2024
lcolladotor
0
1k
The Invisible Side of Design
smashingmag
301
52k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k