Full-Stack Web Development with Vue.js and Node
Building an Express Application Chapter 2 Now, let's restart our node server for the app with: $ node app.js With this, when we ...
Building an Express Application Chapter 2 To run the server, use the following command: $ nodemon app.js File naming conventions ...
Building an Express Application Chapter 2 Remember, there is no official naming convention in Node.js. We can definitely customi ...
Building an Express Application Chapter 2 Now, if we used nodemon, we don't have to restart our server; just reload the browser ...
Building an Express Application Chapter 2 The render method has two parameters: the view that it wants to load and the variables ...
Building an Express Application Chapter 2 That's how we create the views for an express application. Now, go ahead and add views ...
3 Introducing MongoDB The name MongoDB comes from the phrase huMONGOus data, meaning that it can handle a lot of data. MongoDB i ...
Introducing MongoDB Chapter 3 Why MongoDB? MongoDB provides a lot of advantages, some of which are: Flexible documents: A MongoD ...
Introducing MongoDB Chapter 3 Creating documents There are different queries to create a document in MongoDB, such as insertOne( ...
Introducing MongoDB Chapter 3 The insertOne() and insertMany() commands only work for Mongo version 3.2 or higher. insertMany() ...
Introducing MongoDB Chapter 3 insert() This command inserts single as well as multiple documents into a collection. It does the ...
Introducing MongoDB Chapter 3 The output should be as follows: Retrieving documents Retrieving documents from collections in Mon ...
Introducing MongoDB Chapter 3 This outputs the following: Finding documents via filters We can add filters to the find() command ...
Introducing MongoDB Chapter 3 The comma operator means an AND operator. We can specify as many conditions as we like with comma- ...
Introducing MongoDB Chapter 3 updateOne() This command updates only a single document in the collection. Here, we have inserted ...
Introducing MongoDB Chapter 3 The only difference between updateOne() and updateMany() is that updateOne() updates only the firs ...
Introducing MongoDB Chapter 3 This removes the entry of a user whose name is John. The output is as follows: As you can see in t ...
Introducing MongoDB Chapter 3 The output is as follows: As you can see, we had two entries with the name Mike, but it only remov ...
Introducing MongoDB Chapter 3 Mongoose is a data modeling technique for Mongo written in Node.js. Every document inside a Mongoo ...
Introducing MongoDB Chapter 3 Connecting Mongoose to MongoDB Once Mongoose is installed, we have to connect it to the MongoDB in ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf