ORPP logo
Image from Google Jackets

Advanced Node. js Development : Master Node. js by Building Real-World Applications.

By: Material type: TextTextPublisher: Birmingham : Packt Publishing, Limited, 2018Copyright date: ©2018Edition: 1st edDescription: 1 online resource (584 pages)Content type:
  • text
Media type:
  • computer
Carrier type:
  • online resource
ISBN:
  • 9781788394796
Subject(s): Genre/Form: Additional physical formats: Print version:: Advanced Node. js DevelopmentDDC classification:
  • 005.2762
LOC classification:
  • QA76.73.J39 .M433 2018
Online resources:
Contents:
Cover -- Title Page -- Copyright and Credits -- Packt Upsell -- Contributors -- Table of Contents -- Preface -- Chapter 1: Getting Set Up -- Installing MongoDB and Robomongo for Linux and macOS -- Installing MongoDB and Robomongo for Windows -- Creating and reading data -- Summary -- Chapter 2: MongoDB, Mongoose, and REST APIs - Part 1 -- Connecting to MongoDB and writing data -- Creating a directory for the project -- Connecting the mongodb-connect file to the database -- Adding a string as the first argument -- Adding the callback function as the second argument -- Error handling in mongodb-connect -- Running the file in the Terminal -- Adding data to the database -- Adding a new record into a collection -- The ObjectId -- The _id property in the context of MongoDB -- Calling the .getTimestamp function -- Using object destructuring ES6 -- Creating a new instance of objectID -- Fetching data -- Fetching todos in Robomongo file -- The find method -- Writing a query to fetch certain values -- Writing a query to fetch completed todos -- Qureying todos by id -- Implementing the count method -- Querying users collection -- Setting up the repo -- Deleting documents -- Exploring methods to delete data -- The deleteMany method -- The deleteOne Method -- The deleteOne method -- The findOneAndDelete method -- Using the deleteMany and findOneAndDelete methods -- Removing duplicate documents -- Targeting the documents using ID -- Running the findOneAndDelete and deleteMany statements -- Making commit for the deleting documents methods -- Updating data -- Summary -- Chapter 3: MongoDB, Mongoose, and REST APIs - Part 2 -- Setting up Mongoose -- Setting up root of the project -- Connecting mongoose to database -- Creating the todo model -- Creating a brand-new Todo -- Saving the instance to the database -- Running the Todos script.
Creating a second Todo model -- Validators, Types, and Defaults -- Mongoose validators -- Customizing the Todo text property -- Mongoose defaults -- Mongoose types -- Creating a Mongoose user model for authentication -- Setting up the email property -- Installing Postman -- Making an HTTP request to Google -- Illustrating working of the JSON data -- Resource Creation Endpoint - POST /todos -- Refactoring the server.js file to create POST todos route -- Configuring the Todo and Users file -- Loading Todo and User file in server.js -- Configuring the Express application -- Configuring the POST route -- Getting body data from the client -- Creating an instance of Mongoose model -- Setting up HTTP status code -- Testing POST /todos inside of Postman -- Adding more Todos to the database -- Testing POST /todos -- Installing npm modules for testing POST /todos route -- Setting up the test files -- Loading the test files -- Adding describe block for the test cases -- Making the POST requests via supertest -- Making assertions about the POST request -- Making a request to fetch the Todos from the database -- Adding the catch call for the error handling -- Setting up test scripts in package.json -- Adding testing life cycle method in server.test.js file -- Running the test suite -- Test case: should not create todo with invalid body data -- Making assertions about the length of the Todos collection -- Making commit for POST /todos route -- List Resources - GET /todos -- Creating the GET /todos route -- Testing the GET /todos route -- Setting up Post request to create a todo -- Testing GET /todos -- Adding seed data for the GET /todos test case -- Adding a describe block to the test case -- Adding assertions to the test case -- Summary -- Chapter 4: MongoDB, Mongoose, and REST APIs - Part 3 -- Mongoose queries and ID validation -- Todo.find method.
Todo.findOne method -- Todo.findById method -- Handling situations where the ID doesn't exist -- Validating an ObjectID -- Getting an individual resource - GET /todos/:id -- Taking on the challenge -- Challenge step 1 - filling the code -- Challenge step 2 - Making the query -- challenge step 3 - success path -- Testing GET /todos/:id -- Writing test cases for GET/todos/:id -- Test 1 - Super test request -- Test 2 - Verifying invalid ID -- Test 3 - Validating invalid ObjectID -- Deploying the API to Heroku -- Creating a Heroku app -- Heroku logs -- Postman environments -- Managing Postman environments -- Todo App Local environment -- Todo App Heroku environment -- Deleting a resource - DELETE /todos/:id -- Todo.remove method -- Todo.findOneAndRemove method -- Todo.findByIdAndRemove method -- Creating a delete route -- Testing DELETE /todos/:id -- Test case 1 - should remove a todo -- Test case 2 - should return 404 if todo not found -- Test case 3 - should return 404 if object id is invalid -- Test case 4 - should return 404 if todo not found -- Updating a Resource - PATCH /todos/:id -- Installing Lodash library -- Testing Todos for the patch call -- Testing PATCH /todos/:id -- Test 1 -  To complete the incomplete todo -- Test 2 - to make complete todo incomplete -- Creating a Test database -- Summary -- Chapter 5: Real-Time Web Apps with Socket.io -- Creating a new web app project -- Setting up our basic app structure -- Setting up the index.html file for DOCTYPE -- Setting up the server.js file for the public directory -- The join method -- Configuring basic server setup -- Setting up a gitignore file -- Making a commit with the current uncommitted files -- Adding Socket.io to an app -- Setting up Socket.io -- Creating a server using the http library -- Configuring the server to use Socket.io -- Communication between the client and server.
The io.on method -- Adding a connection event in the client -- The disconnect event -- Emitting and listening to custom events -- Creating custom events inside an application -- Moving the JavaScript into a separate file -- Adding a newEmail custom event -- The emit method -- Testing the newEmail event -- Adding a createEmail custom event -- socket.emit in the developer console -- The custom events in the chat app -- The newMessage event -- Broadcasting events -- Wiring up the createMessage listener for all users -- Testing the messaging events -- Committing and deploying messaging to Heroku -- Testing messaging in a Firefox browser using Heroku -- Broadcasting events to other users -- Emitting two events when a user connects -- Greeting an individual user -- Broadcasting a new user in the chat -- Testing the user connection -- Summary -- Chapter 6: Generating newMessage and newLocationMessage -- Message generator and tests -- Generating the newMessage object using the utility function -- Writing test cases -- Adding the test-watch script -- Adding the test script -- Running the test suite for the message utility -- Integrate the utility function into our application -- Event acknowledgements -- Setting up acknowledgements -- Sending an acknowledgement from server to the client -- Updating the event emitter -- Updating the event listener -- The message form and jQuery -- Using the jQuery library -- Adding the form field in index.html -- Setting up the form tag -- Adding the text field -- Testing the form's rendering -- Using jQuery to select element -- Adding the selector element to index.js -- Testing the update event listener -- Rendering incoming messages to the screen -- Creating an ordered list to render messages -- Using jQuery to create element in index.js -- Testing the incoming messages -- Making a commit for the message form -- Geolocation.
Adding the Send Location button to the application -- Adding a click listener to the Send Location button -- Checking access to the geolocation API -- Fetching a user's position -- Adding the coordinates object in the users position -- Passing coordinates data with the connected users -- Rendering clickable link in place of text coordinates -- Sorting out the URL structure -- Emitting newLoactionMessage -- Adding generateLocationMessage in the message.js file -- Adding an event listener for newLocationMessage -- Adding test case for generateLocationMessage -- Adding variables for the test case -- Making assertion for generateLocationMessage -- Running the test case for generateLocationMessage -- Summary -- Chapter 7: Styling Our Chat Page as a Web App -- Styling the chat page -- Storing the template styles -- Tweaking the structure for alignment -- Making user experience improvements -- Changing the form submit listener -- Updating the input tag -- Customizing the Send Location -- Updating the button text -- Timestamps and formatting with Moment -- Timestamps in Node -- The Date object -- Using Moment for timestamps -- The Moment documentation -- Formatting date using Moment -- The Manipulate section in Moment -- Printing message timestamps -- Getting the formatted values back from timestamps -- Updating the message.js file -- Integrating Moment on client -- Updating the newMessage property -- Updating the newLocationMessage property -- Mustache.js -- Adding mustache.js to the directory -- Creating and rendering template for newMessage -- Implementing the Mustache.js rendering method -- Getting all the data showing up -- Providing a custom structure -- Adding the list item tag -- Adding the message body tag -- Creating template for the newLocation message -- Rendering the newLocation template -- Autoscrolling.
Running a height properties calculation.
Summary: Advanced Node.js Development takes your Node.js skills to the next level. The book is based on the latest release of Node (9.x) and covers advanced topics, such as building real-time web apps with Socket.IO, and reactive, asyncronous apps with Async and Await. You don't need to have read the first book in the series; any developer who knows.
Tags from this library: No tags from this library for this title. Log in to add tags.
Star ratings
    Average rating: 0.0 (0 votes)
No physical items for this record

Cover -- Title Page -- Copyright and Credits -- Packt Upsell -- Contributors -- Table of Contents -- Preface -- Chapter 1: Getting Set Up -- Installing MongoDB and Robomongo for Linux and macOS -- Installing MongoDB and Robomongo for Windows -- Creating and reading data -- Summary -- Chapter 2: MongoDB, Mongoose, and REST APIs - Part 1 -- Connecting to MongoDB and writing data -- Creating a directory for the project -- Connecting the mongodb-connect file to the database -- Adding a string as the first argument -- Adding the callback function as the second argument -- Error handling in mongodb-connect -- Running the file in the Terminal -- Adding data to the database -- Adding a new record into a collection -- The ObjectId -- The _id property in the context of MongoDB -- Calling the .getTimestamp function -- Using object destructuring ES6 -- Creating a new instance of objectID -- Fetching data -- Fetching todos in Robomongo file -- The find method -- Writing a query to fetch certain values -- Writing a query to fetch completed todos -- Qureying todos by id -- Implementing the count method -- Querying users collection -- Setting up the repo -- Deleting documents -- Exploring methods to delete data -- The deleteMany method -- The deleteOne Method -- The deleteOne method -- The findOneAndDelete method -- Using the deleteMany and findOneAndDelete methods -- Removing duplicate documents -- Targeting the documents using ID -- Running the findOneAndDelete and deleteMany statements -- Making commit for the deleting documents methods -- Updating data -- Summary -- Chapter 3: MongoDB, Mongoose, and REST APIs - Part 2 -- Setting up Mongoose -- Setting up root of the project -- Connecting mongoose to database -- Creating the todo model -- Creating a brand-new Todo -- Saving the instance to the database -- Running the Todos script.

Creating a second Todo model -- Validators, Types, and Defaults -- Mongoose validators -- Customizing the Todo text property -- Mongoose defaults -- Mongoose types -- Creating a Mongoose user model for authentication -- Setting up the email property -- Installing Postman -- Making an HTTP request to Google -- Illustrating working of the JSON data -- Resource Creation Endpoint - POST /todos -- Refactoring the server.js file to create POST todos route -- Configuring the Todo and Users file -- Loading Todo and User file in server.js -- Configuring the Express application -- Configuring the POST route -- Getting body data from the client -- Creating an instance of Mongoose model -- Setting up HTTP status code -- Testing POST /todos inside of Postman -- Adding more Todos to the database -- Testing POST /todos -- Installing npm modules for testing POST /todos route -- Setting up the test files -- Loading the test files -- Adding describe block for the test cases -- Making the POST requests via supertest -- Making assertions about the POST request -- Making a request to fetch the Todos from the database -- Adding the catch call for the error handling -- Setting up test scripts in package.json -- Adding testing life cycle method in server.test.js file -- Running the test suite -- Test case: should not create todo with invalid body data -- Making assertions about the length of the Todos collection -- Making commit for POST /todos route -- List Resources - GET /todos -- Creating the GET /todos route -- Testing the GET /todos route -- Setting up Post request to create a todo -- Testing GET /todos -- Adding seed data for the GET /todos test case -- Adding a describe block to the test case -- Adding assertions to the test case -- Summary -- Chapter 4: MongoDB, Mongoose, and REST APIs - Part 3 -- Mongoose queries and ID validation -- Todo.find method.

Todo.findOne method -- Todo.findById method -- Handling situations where the ID doesn't exist -- Validating an ObjectID -- Getting an individual resource - GET /todos/:id -- Taking on the challenge -- Challenge step 1 - filling the code -- Challenge step 2 - Making the query -- challenge step 3 - success path -- Testing GET /todos/:id -- Writing test cases for GET/todos/:id -- Test 1 - Super test request -- Test 2 - Verifying invalid ID -- Test 3 - Validating invalid ObjectID -- Deploying the API to Heroku -- Creating a Heroku app -- Heroku logs -- Postman environments -- Managing Postman environments -- Todo App Local environment -- Todo App Heroku environment -- Deleting a resource - DELETE /todos/:id -- Todo.remove method -- Todo.findOneAndRemove method -- Todo.findByIdAndRemove method -- Creating a delete route -- Testing DELETE /todos/:id -- Test case 1 - should remove a todo -- Test case 2 - should return 404 if todo not found -- Test case 3 - should return 404 if object id is invalid -- Test case 4 - should return 404 if todo not found -- Updating a Resource - PATCH /todos/:id -- Installing Lodash library -- Testing Todos for the patch call -- Testing PATCH /todos/:id -- Test 1 -  To complete the incomplete todo -- Test 2 - to make complete todo incomplete -- Creating a Test database -- Summary -- Chapter 5: Real-Time Web Apps with Socket.io -- Creating a new web app project -- Setting up our basic app structure -- Setting up the index.html file for DOCTYPE -- Setting up the server.js file for the public directory -- The join method -- Configuring basic server setup -- Setting up a gitignore file -- Making a commit with the current uncommitted files -- Adding Socket.io to an app -- Setting up Socket.io -- Creating a server using the http library -- Configuring the server to use Socket.io -- Communication between the client and server.

The io.on method -- Adding a connection event in the client -- The disconnect event -- Emitting and listening to custom events -- Creating custom events inside an application -- Moving the JavaScript into a separate file -- Adding a newEmail custom event -- The emit method -- Testing the newEmail event -- Adding a createEmail custom event -- socket.emit in the developer console -- The custom events in the chat app -- The newMessage event -- Broadcasting events -- Wiring up the createMessage listener for all users -- Testing the messaging events -- Committing and deploying messaging to Heroku -- Testing messaging in a Firefox browser using Heroku -- Broadcasting events to other users -- Emitting two events when a user connects -- Greeting an individual user -- Broadcasting a new user in the chat -- Testing the user connection -- Summary -- Chapter 6: Generating newMessage and newLocationMessage -- Message generator and tests -- Generating the newMessage object using the utility function -- Writing test cases -- Adding the test-watch script -- Adding the test script -- Running the test suite for the message utility -- Integrate the utility function into our application -- Event acknowledgements -- Setting up acknowledgements -- Sending an acknowledgement from server to the client -- Updating the event emitter -- Updating the event listener -- The message form and jQuery -- Using the jQuery library -- Adding the form field in index.html -- Setting up the form tag -- Adding the text field -- Testing the form's rendering -- Using jQuery to select element -- Adding the selector element to index.js -- Testing the update event listener -- Rendering incoming messages to the screen -- Creating an ordered list to render messages -- Using jQuery to create element in index.js -- Testing the incoming messages -- Making a commit for the message form -- Geolocation.

Adding the Send Location button to the application -- Adding a click listener to the Send Location button -- Checking access to the geolocation API -- Fetching a user's position -- Adding the coordinates object in the users position -- Passing coordinates data with the connected users -- Rendering clickable link in place of text coordinates -- Sorting out the URL structure -- Emitting newLoactionMessage -- Adding generateLocationMessage in the message.js file -- Adding an event listener for newLocationMessage -- Adding test case for generateLocationMessage -- Adding variables for the test case -- Making assertion for generateLocationMessage -- Running the test case for generateLocationMessage -- Summary -- Chapter 7: Styling Our Chat Page as a Web App -- Styling the chat page -- Storing the template styles -- Tweaking the structure for alignment -- Making user experience improvements -- Changing the form submit listener -- Updating the input tag -- Customizing the Send Location -- Updating the button text -- Timestamps and formatting with Moment -- Timestamps in Node -- The Date object -- Using Moment for timestamps -- The Moment documentation -- Formatting date using Moment -- The Manipulate section in Moment -- Printing message timestamps -- Getting the formatted values back from timestamps -- Updating the message.js file -- Integrating Moment on client -- Updating the newMessage property -- Updating the newLocationMessage property -- Mustache.js -- Adding mustache.js to the directory -- Creating and rendering template for newMessage -- Implementing the Mustache.js rendering method -- Getting all the data showing up -- Providing a custom structure -- Adding the list item tag -- Adding the message body tag -- Creating template for the newLocation message -- Rendering the newLocation template -- Autoscrolling.

Running a height properties calculation.

Advanced Node.js Development takes your Node.js skills to the next level. The book is based on the latest release of Node (9.x) and covers advanced topics, such as building real-time web apps with Socket.IO, and reactive, asyncronous apps with Async and Await. You don't need to have read the first book in the series; any developer who knows.

Description based on publisher supplied metadata and other sources.

Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2024. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.

There are no comments on this title.

to post a comment.

© 2024 Resource Centre. All rights reserved.