You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An education GitPod module intended to teach individuals how to use mongo on any machine.
2
+
This a standalone educational GitPod module designed to teach people how to use basic CRUD methods with mongoDB.
3
3
4
-
A possible unit as of the
5
-
6
-
Here we are applying the idea of [GhostPlate](https://github.com/HansUXdev/GhostPlate) built on GitPod to education instead of Industry at scale ...
4
+
## Unit Learning Objective
5
+
Students should be to:
6
+
1. Teach Basic CRUD methods with MongoDB & GitPod
7
+
2. Use Docker Compose to start and stop mongoDB environment
8
+
3. Use Docker, Terminal & MongoExpress to teach basic mongoDB concepts
9
+
4. Distinguish between the name of a docker image (mongo) and the container name (learn-mongo)
10
+
5. Use NPM Scripts to store docker commands
11
+
7
12
8
13
# Read and Code Along!
9
14
Assuming you are logged into github, then just click the button below. Phone, Tablet, Mac, Windows, Linux, Chromebook, as long as GitPod runs, you can learn how to code, anywhere!
@@ -12,14 +17,13 @@ Assuming you are logged into github, then just click the button below. Phone, Ta
12
17
<ahref="https://gitpod.io/#https://github.com/HansUXdev/MongoLearnPodt"><imgsrc="http://gitpod.io/button/open-in-gitpod.svg"alt="Open on GitPod"height="50px"/></a>
13
18
</p>
14
19
15
-
Then follow the directions inside the GitPod. Don't worry its still better than Microsoft documentation...
20
+
Then follow the directions inside the GitPod. Here is a gif of the slideshow which was built using [vscode-reveal](https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal). If you have the extension installed you can follow long with the fancy [slideshow](./01-CRUD.md), otherwise you can just read it in readme formate and it'll just look slightly less presentable...
21
+
22
+
23
+
[]()
24
+
25
+
16
26
17
-
## Unit Learning Objective
18
-
Students should be to:
19
-
1. Use Docker Compose to start and stop mongoDB environment
20
-
2. Use Docker, Terminal & MongoExpress to teach basic mongoDB concepts
21
-
3. Distinguish between the name of a docker image (mongo) and the container name (learn-mongo)
22
-
4. Use NPM Scripts to store docker commands
23
27
24
28
25
29
# What did you build
@@ -32,58 +36,25 @@ Students should be to:
32
36
3. Distinguish between the name of a docker image (mongo) and the container name (learn-mongo)
33
37
4. Use NPM Scripts to store docker commands such as docker exec for mongo shell
34
38
35
-
# About me
36
-
Hans McMurdy is an experianced web developer and coding teacher.
37
-
38
-
## About
39
-
This is a brief mongo tutorial in GitPod and originally built for docker and docker compose which you can see [here](https://github.com/HansUXdev/OSS-Books/tree/master/JavaScript-First/00-JavaScript-DataBases/mongo).
40
39
41
40
## Using Mongo Shell to build a database
42
-
Type the following into a NEW terminal: ` mongo`. Because no one in chat wanted to help me run it in headless mode (thanks, support :-) ).
41
+
Type the following into a NEW terminal: ` mongo`.
43
42
44
-
Lets go ahead and create a new *collection* and use it.
45
-
46
-
Type the following into the terminal: `use mongo`.
47
-
48
-
We can then show the database we are using by using the `db` command.
49
-
50
-
Next we are going to insert some data into our new database.
51
-
To do this we'll use the the [insert](https://docs.mongodb.com/manual/tutorial/insert-documents/) command.
52
-
53
-
54
-
```js
55
-
db.info.insert(
56
-
{
57
-
"country":"United States of America",
58
-
"state":"Arizona",
59
-
"cities": ["Phoenix", "Mesa", "Chandler"]
60
-
}
61
-
)
62
-
```
63
-
This will insert a new *document* into the info *collection*.
64
-
65
-
**Exercise**
66
-
Next, you should come up with 2 other states, with atleast two cities in each.
67
43
68
-
Finally, we will use the [.find()]() method to find the document with a state of Arizona.
69
-
70
-
```js
71
-
db.info.find({state:'Arizona'}).pretty()
72
-
```
73
-
Note that the [.pretty()]() command just formates the data more properly.
74
-
75
-
76
-
By the end of the exercise your terminal should look something like following but with different examples:
77
-
[]()
78
-
79
-
If we open mongo-express, we should see a new database appeared. We can also use the terminal command `show dbs` to display them in terminal.
44
+
45
+
# Conclusion
46
+
If you like it this repo and want to see more on this topic, give it a star.
80
47
81
-
[]()
48
+
If there is enough interest in it, I'll add it too the final draft of [JavaScript-First](https://github.com/HansUXdev/JavaScript-First) which is an open source book that teaches people how to code with JavaScript using the node.js runtime environment rather than a browser and by the end, you will build a server and a website using JavaScript.
@@ -94,16 +65,7 @@ This is a brief mongo tutorial in GitPod and originally built for docker and doc
94
65
95
66
96
67
97
-
## Final thoughts and next steps
68
+
<!--## Final thoughts and next steps
98
69
99
-
1. Try this out with the local docker version.
100
-
70
+
1. Try this out with the local docker version. -->
101
71
102
-
## Open Source Book Candidate
103
-
This a standalone educational module unit. If you like it and want to see more on this topic, give it a stars. If there is enough interest in it, I'll add it too [JavaScript-First](https://github.com/HansUXdev/JavaScript-First) is an open source book that teaches people how to code with JavaScript using the node.js runtime environment rather than a browser and by the end, you will build a server and a website using JavaScript.
0 commit comments