Egghead Instructor Will Button

Will Button

Startups | Fitness | Data | Performance



Unlock all of Will's PRO Lessons
click for instant access!

Browse Will Button's lessons.

showing 79 lessons...

Create an index using the Elasticsearch API

P

Update data in Elasticsearch

P

Search for data in Elasticsearch using queryDSL language

P

Get data from Elasticsearch by id using http

P

Search for data in Elasticsearch using the _search endpoint

P

Create an alias for an Elasticsearch index

P

Create a type and map in an index

P

Bulk import data into Elasticsearch

P

Monitor Elasticsearch cluster health and status with the _cat API

P

Close and open an Elasticsearch index

P

Monitor Elasticsearch cluster health and status with the _cluster and _nodes APIs

P

Delete an index using the Elasticsearch API

P

Understand the role of JVM heap in Elasticsearch performance

P

Reindex data from an existing Elasticsearch index

P

Perform analytics using Elasticsearch aggregation queries

P

Search for data in Elasticsearch using full text search

P

Paginate through search results in Elasticsearch

P

Search Elasticsearch using Query Parameters

P

Add data to Elasticsearch

P

Get data from Elasticsearch by id using the Elasticsearch npm client

P

Test for HTTP 400 responses with Mocha and Chai

P

Test Node RESTful API with Mocha and Chai

P

Convert a callback to a promise

P

Difference between tilde (~) and caret (^) in package.json

P

Use ES6 style Promises with Node.js

P

Identify memory leaks with nodejs-dashboard

P

Create an API with Swagger

Build Monitoring into your API Server

P

Perform Load Tests on an API Server using Apache jmeter

P

Connect an existing React application to an API server created with Swagger

P

Create a Node.js function for an HTTP PUT request for a Swagger API

P

Create a Node.js function for an HTTP GET request with URL parameters

P

Create a Node.js function for an HTTP POST request for a Swagger API

P

Create a Node.js function for an HTTP DELETE request for a Swagger API

P

Create a Node.js function for an HTTP GET request for a Swagger API

P

Define an HTTP DELETE Endpoint for a Node.js API Server with Swagger

P

Mock API Responses with Swagger

P

Define an HTTP PUT Endpoint for a Node.js API Server with Swagger

P

Define an HTTP GET Endpoint with URL Parameters for a Node.js Server with Swagger

P

Define an HTTP POST Endpoint for a Node.js Server with Swagger

P

Define an HTTP GET Endpoint for a Node.js API Server with Swagger

P

Create An API Schema Definition Using Swagger

P

Pass command line arguments to node.js

P

Use nodejs-dashboard event loop delay

P

Use Realm Object Database with Node.js

P

Install nodejs-dashboard

P

Testing ES6 Promises in Node.js using Mocha and Chai

P

Deploy Node.js on Docker

P

Changes to Buffers in Node.js 6

P

Using npm scripts to deploy to a Vagrant image

P
otherjs tutorial about Create an index using the Elasticsearch API

Create an index using the Elasticsearch API

4:29 otherjs PRO

The index is the top-most schema level for your data. You will learn how to create an index in this lesson. You will be introduced to shards and replicas and how decisions about them will impact future performance, scalability and resiliency. You also learn what the elasticsearch cluster health status “green”, “yellow”, and “red” mean, not only in terms of cluster health but how it impacts your query search results.

otherjs tutorial about Update data in Elasticsearch

Update data in Elasticsearch

6:07 otherjs PRO

Elasticsearch offers two API endpoints for updating documents. In this lesson you will learn how to use those endpoints to replace entire documents in the store and update partial information within a document.

otherjs tutorial about Search for data in Elasticsearch using queryDSL language

Search for data in Elasticsearch using queryDSL language

3:49 otherjs PRO

Query DSL is based on JSON and allows for Leaf and Compound query clauses. The Query DSL is what you will want to use to write your production queries. It makes your queries more flexible, precise, easier to read and easier to debug.

otherjs tutorial about Get data from Elasticsearch by id using http

Get data from Elasticsearch by id using http

3:36 otherjs PRO

Elasticsearch provides a powerful API over http for accessing its features. In this lesson, you will be introduced to the API and learn how to use it to get data from Elasticsearch using the browser and the popular command curl.
We will see how adding query stream parameters can exclude or include the properties that we desire from our data.

Setup is specified in the README.md of the repository linked below.

otherjs tutorial about Search for data in Elasticsearch using the _search endpoint

Search for data in Elasticsearch using the _search endpoint

4:15 otherjs PRO

Elasticsearch provides several methods for using its powerful search features. In this lesson, you will be introduced to the _search endpoint, the datapoints returned in results, how to set a query timeout (and what a timeout doesn’t do), and how to search specific indices and types.

otherjs tutorial about Create an alias for an Elasticsearch index

Create an alias for an Elasticsearch index

2:17 otherjs PRO

Creating an alias can make searching easier by providing a friendlier name for the index. It can also be useful to create a filtered subset of the data, providing a better search experience for the client. You will learn how to do both in this lesson.

otherjs tutorial about Create a type and map in an index

Create a type and map in an index

9:43 otherjs PRO

Types can probably be best thought of as a Class for your index and a map is the definition for that type. In this lesson, you will learn how to create a mapping type for an index based on sample data, verify it, then store data in the index using that type. You will also learn how Elasticsearch can automatically create them for you (known as Dynamic Mapping), and you’ll learn what mapping explosion is and how to avoid it.

otherjs tutorial about Bulk import data into Elasticsearch

Bulk import data into Elasticsearch

8:13 otherjs PRO

Elasticsearch has a rich set of APIs for adding data to an index but for loading massive amounts of data, you’ll find the bulk interface much more efficient and performant. In this lesson you will learn how to format your data for bulk loading, add data via the bulk endpoint with curl, and add data via the bulk endpoint using the elasticsearch npm client.

otherjs tutorial about Monitor Elasticsearch cluster health and status with the _cat API

Monitor Elasticsearch cluster health and status with the _cat API

7:49 otherjs PRO

Elasticsearch has an in-depth set of APIs for accessing the health and performance of the cluster. In this lesson, you will learn how to access them using the _cat API endpoint, designed for console use. You will also learn some of the key metrics to monitor to identify issues and performance problems with your Elasticsearch cluster before it impacts your application and clients, including how to tell if your Elasticsearch cluster isn’t returning results based on all of your data.

otherjs tutorial about Close and open an Elasticsearch index

Close and open an Elasticsearch index

1:19 otherjs PRO

Closing and opening indices on Elasticsearch allow you to free up resources in your cluster when they aren’t needed, preventing you from scaling or growing your cluster to support unused indices. In this lesson, you will see how easy it is to do both and learn to do so on your own indices.

otherjs tutorial about Monitor Elasticsearch cluster health and status with the _cluster and _nodes APIs

Monitor Elasticsearch cluster health and status with the _cluster and _nodes APIs

2:40 otherjs PRO

Using the _cat API is great for console based, adhoc queries of your cluster. To get even more detailed info on the health and performance of your cluster, or for programmatic access, the _cluster and _nodes endpoints may be your new best friends. There is a tremendous amount of information available about your elasticsearch cluster via these APIs. This lesson doesn’t cover all of them exhaustively, but instead introduces you to the endpoints and the data returned, arming you with the skills you need to go deeper as needed using the Elasticsearch docs found here.

otherjs tutorial about Delete an index using the Elasticsearch API

Delete an index using the Elasticsearch API

1:22 otherjs PRO

In this lesson, you will learn how to delete a single index, multiple indices, or all indices on your Elasticsearch cluster. We’ll see how a simple DELETE request can delete any index you like.

otherjs tutorial about Understand the role of JVM heap in Elasticsearch performance

Understand the role of JVM heap in Elasticsearch performance

2:34 otherjs PRO

This is more of an analysis of how the jvm heap will kill your Elasticsearch cluster than a “how-to” lesson. If you aren’t familiar with Java apps and the jvm, this 2 1/2 minutes can save you much pain, suffering, and self-loathing by showing you how Elasticsearch utilizes the jvm heap for performance and what to monitor so you know when it’s affecting you.

otherjs tutorial about Reindex data from an existing Elasticsearch index

Reindex data from an existing Elasticsearch index

4:20 otherjs PRO

Business requirements change, new information is discovered, or usage patterns differ from the expected use. In any case, sooner or later you will find the need to reindex your data to accommodate these changes. In this lesson you will learn how to leverage the information stored in Elasticsearch and the bulk API to reindex data from one index to another.

otherjs tutorial about Perform analytics using Elasticsearch aggregation queries

Perform analytics using Elasticsearch aggregation queries

12:29 otherjs PRO

Aggregation queries can be thought of as similar to GROUP BY in SQL or the Aggregation Framework in MongoDB, but much more powerful. In this lesson you will learn how to create aggregation queries to group documents and perform rollups and calculations based on the results. Aggregation documentation can be found here

otherjs tutorial about Search for data in Elasticsearch using full text search

Search for data in Elasticsearch using full text search

6:26 otherjs PRO

Using Full Text Search is where the search capabilities of Elasticsearch start to really set it apart from databases. In this lesson, you will learn how to perform full text searches against your data, interpret the results, and understand how the relevance score is impacts your search results. If you are following the examples in this course, be sure to import the Simpsons episode scripts for this lesson by running node utils/episode_scripts.js from the git repo directory.

otherjs tutorial about Paginate through search results in Elasticsearch

Paginate through search results in Elasticsearch

2:01 otherjs PRO

By default, search results are limited to the top 10 results. In this lesson, you will learn how to change the pagination size, paginate through results, and you will learn about the performance implications of pagination on Elasticsearch.

otherjs tutorial about Search Elasticsearch using Query Parameters

Search Elasticsearch using Query Parameters

4:20 otherjs PRO

Simple searches can be done using query parameters, also known as “Search Lite” by Elasticsearch. You will learn how to perform query parameter searches in this lesson and also discover the upper limits of its usability in this lesson.

otherjs tutorial about Add data to Elasticsearch

Add data to Elasticsearch

4:48 otherjs PRO

In this lesson, you will learn how to add new documents to the Elasticsearch data store using HTTP methods and the Elasticsearch API. You will also learn how Elasticsearch uniquely identifies each document and what happens when you attempt to create a document that already exists.

otherjs tutorial about Get data from Elasticsearch by id using the Elasticsearch npm client

Get data from Elasticsearch by id using the Elasticsearch npm client

5:10 otherjs PRO

Elasticsearch provides a full featured client for nodejs available via npm. In this lesson, you will learn to how install the client and use it to retrieve data from your Elasticsearch server.
We will walk through retrieving data through callbacks as well as using promises.

node tutorial about Test for HTTP 400 responses with Mocha and Chai

Test for HTTP 400 responses with Mocha and Chai

2:50 node PRO

In this lesson, you will learn how to verify your API server is returning HTTP 400 responses when clients submit incorrect data. Returning HTTP 400 ensures that your clients are notified of the incorrect usage. Testing for them ensures your API returns errors instead of incorrect responses when supplied with incorrect data.

node tutorial about Test Node RESTful API with Mocha and Chai

Test Node RESTful API with Mocha and Chai

12:05 node PRO

In this lesson, we will use Chai's request method to test our Node application's API responses.
By the end of this lesson, you will know how to:
- install the prerequisites to use mocha and chai in your application
- test for HTTP status response codes
- test for a string of text on a page
- test for a json response and validate the properties of the object
- write tests that not only verify the response of your application, but the behavior as well

js tutorial about Convert a callback to a promise

Convert a callback to a promise

4:45 js PRO

Promises are rapidly overtaking callbacks in popularity. In this lesson, I show you how to rewrite a callback using ES6 Promises. After getting a handle on the basics, we'll convert an error-first style callback to use the Resolve and Reject handlers built into Promises. If you aren't familiar with Promises, this lesson can be a great starting point by learning how to duplicate the behavior of a callback with ES6 Promises.

node tutorial about Difference between tilde (~) and caret (^) in package.json

Difference between tilde (~) and caret (^) in package.json

2:36 node PRO

As a beginning node.js user, you will often see the tilde (~) or caret (^) in front of the version number for dependencies managed by your package.json file. In this lesson, you will learn what each means, when to use it, the implications of each and a brief introduction to Semantic Versioning.

node tutorial about Use ES6 style Promises with Node.js

Use ES6 style Promises with Node.js

5:56 node PRO

Using promises can be confusing. In this lesson, I show you how to create promises to chain functions together in a specified order. You'll also learn how to pass the return value of promises as the input parameters of promises further down the chain. All examples in this lesson utilize native ES6 style promises, which are fully supported by recent versions of node.js without any dependencies.

node tutorial about Identify memory leaks with nodejs-dashboard

Identify memory leaks with nodejs-dashboard

2:12 node PRO

In this lesson, I introduce a memory leak into our node.js application and show you how to identify it using the Formidable nodejs-dashboard. Once identified, we will add garbage collection stats to the error console allowing us to correlate garbage collection with the increased memory usage.

node tutorial about Create an API with Swagger

Create an API with Swagger

3:56 node

Swagger is a project used to describe restful APIs using the OpenAPI Specification. It allows you to document your API so consumers understand the endpoints, parameters, and responses. In this lesson, I'll show you how to install the swagger command line tool, create a new API project using swagger, and introduce you to the swagger API editor.

node tutorial about Build Monitoring into your API Server

Build Monitoring into your API Server

7:06 node PRO

There are a lot of great monitoring tools available for Node.js. It is also incredibly easy to build monitoring into your application. In this lesson, we will add precision monitoring to the function calls in the Todo API server, log it to the console, and persist those results to Elasticsearch where they can later be reviewed, graphed, and analyzed.

node tutorial about Perform Load Tests on an API Server using Apache jmeter

Perform Load Tests on an API Server using Apache jmeter

8:25 node PRO

The last step before deploying your new API server into production is to load test it. Load testing allows you to better understand the performance characteristics as well as forecast load and capacity. Fortunately, load testing is incredibly easy and I'll show you exactly how to create a load test plan, test the response from the API server to ensure it is responding correctly, and scale your test up to simulate as many users as needed.

node tutorial about Connect an existing React application to an API server created with Swagger

Connect an existing React application to an API server created with Swagger

6:01 node PRO

In this lesson, I will show you how to update a simple, skeleton React application to work with the Todo API server built with Swagger. Using existing components, you will learn how to display all Todo items, update an existing Todo item, and add a new Todo item.

node tutorial about Create a Node.js function for an HTTP PUT request for a Swagger API

Create a Node.js function for an HTTP PUT request for a Swagger API

2:52 node PRO

This lesson will teach you how to update a Todo item in Elasticsearch when received from an HTTP PUT method in your API server built with Swagger.

node tutorial about Create a Node.js function for an HTTP GET request with URL parameters

Create a Node.js function for an HTTP GET request with URL parameters

3:33 node PRO

In this lesson, you will learn how to create a function in your Node.js Todo API server that gets the ID of the Todo item being requested from the URL and retrieve the Todo item from Elasticsearch.

node tutorial about Create a Node.js function for an HTTP POST request for a Swagger API

Create a Node.js function for an HTTP POST request for a Swagger API

4:41 node PRO

This lesson shows you how to create the functions defined in the Todo API specification to create new Todo items when received in HTTP POST methods. You will also see the errors you will get when CORS is not properly configured and how to resolve them by installing the NPM CORS package.

node tutorial about Create a Node.js function for an HTTP DELETE request for a Swagger API

Create a Node.js function for an HTTP DELETE request for a Swagger API

2:45 node PRO

This lesson shows you how to delete a Todo item from Elasticsearch using the Todo ID from the URL parameters according to the specifications defined in your Swagger API docs.

node tutorial about Create a Node.js function for an HTTP GET request for a Swagger API

Create a Node.js function for an HTTP GET request for a Swagger API

5:42 node PRO

This lesson will teach you how to create the javascript functions defined by the Swagger specification to return all Todo items to the client when requested with an HTTP GET method.

node tutorial about Define an HTTP DELETE Endpoint for a Node.js API Server with Swagger

Define an HTTP DELETE Endpoint for a Node.js API Server with Swagger

1:02 node PRO

This lesson demonstrates how to access the ID of a Todo item being deleted from the URL parameters when used with an HTTP DELETE method.

node tutorial about Mock API Responses with Swagger

Mock API Responses with Swagger

2:51 node PRO

APIs created with Swagger have a built-in mock function, allowing you to mock responses from your API prior to writing the backend code to make it functional. In addition to learning how to enable this feature, I will show you how to write your own functions to enhance the mock responses returned when using the Swagger mock feature.

node tutorial about Define an HTTP PUT Endpoint for a Node.js API Server with Swagger

Define an HTTP PUT Endpoint for a Node.js API Server with Swagger

0:57 node PRO

In this lesson, you will learn how to define multiple parameters in the API specification to identify the ID of the Todo item being updated in the URL, as well as the contents for the updated Todo item in the body of the request.

node tutorial about Define an HTTP GET Endpoint with URL Parameters for a Node.js Server with Swagger

Define an HTTP GET Endpoint with URL Parameters for a Node.js Server with Swagger

1:35 node PRO

In this lesson, you will learn how to define an HTTP GET endpoint using Swagger with URL parameters to identify the ID of the Todo item being requested.

node tutorial about Define an HTTP POST Endpoint for a Node.js Server with Swagger

Define an HTTP POST Endpoint for a Node.js Server with Swagger

1:23 node PRO

In this lesson, you will learn how to define HTTP POST operations for your Todo API server using Swagger. Creating the endpoint, passing the todo in the request body, and parsing the todo are all demonstrated.

node tutorial about Define an HTTP GET Endpoint for a Node.js API Server with Swagger

Define an HTTP GET Endpoint for a Node.js API Server with Swagger

1:28 node PRO

In this lesson, you will learn how to create an HTTP GET endpoint for a node.js server using Swagger. This endpoint will be used to return all of the Todo items from Elasticsearch to the client.

node tutorial about Create An API Schema Definition Using Swagger

Create An API Schema Definition Using Swagger

2:13 node PRO

Schema definitions allow you to define the format and types of data sent and received by your API. This allows consumers of your API to be confident in using your API. In this lesson, you will learn how to create a schema definition for the Todo API server.

node tutorial about Pass command line arguments to node.js

Pass command line arguments to node.js

3:10 node PRO

Command line arguments are often used to modify the behavior of an application or specify needed parameters for operation. In this lesson, you will learn how to access the command line arguments passed to your node.js application as well as different strategies for evaluating and accessing them.

node tutorial about Use nodejs-dashboard event loop delay

Use nodejs-dashboard event loop delay

5:45 node PRO

In this lesson, you will learn how to use the Formidable nodejs-dashboard event loop delay to identify expensive operations in your code. An example application with excessive synchronous file system write operations is used as well as the provided jmeter configuration to simulate load.

node tutorial about Use Realm Object Database with Node.js

Use Realm Object Database with Node.js

8:03 node PRO

Realm is an ACID compliant object database. In this lesson, you will learn how to install Realm, define schemas for your data, perform CRUD operations and persist your data to the filesystem.

node tutorial about Install nodejs-dashboard

Install nodejs-dashboard

2:54 node PRO

In this lesson, you will learn how to install the Formidable nodejs-dashboard. You will learn what each section of the dashboard is used for and see a sample application in action.

node tutorial about Testing ES6 Promises in Node.js using Mocha and Chai

Testing ES6 Promises in Node.js using Mocha and Chai

4:53 node PRO

Writing great ES6 style Promises for Node.js is only half the battle. Your great modules must include tests as well to ensure future iterations don't break them. In this lesson, I show you a simple ES6 Promise in Node.js, then walk you through creating tests in Mocha using chai and chai-as-promised to test both resolve and reject methods.

node tutorial about Deploy Node.js on Docker

Deploy Node.js on Docker

9:54 node PRO

Getting nodejs to run inside of Docker is relatively simple. Getting nodejs to run inside of Docker while using recommended best practices takes some planning. In this lesson, I’ll show you how to get a simple nodejs web server running in Docker on your local workstation while adhering to best practices.

node tutorial about Changes to Buffers in Node.js 6

Changes to Buffers in Node.js 6

3:14 node PRO

In versions of nodejs prior to 6, how you created a buffer and what you did with it produced different behaviors. This made it possible to introduce security or reliability issues into your code. At the time however, JavaScript had no means of reading or manipulating streams of binary data. Now that TypedArray has been added in ES6, the Buffer class implements the Uint8Array API in a manner that better suits node.js use cases.
In this lesson, you will learn what that means to your existing code and how to update your code to use the new Buffer APIs.

node tutorial about Using npm scripts to deploy to a Vagrant image

Using npm scripts to deploy to a Vagrant image

4:56 node PRO

One of the biggest stumbling blocks I see when pushing code to production servers is unidentified dependencies: something installed locally on my workstation that doesn’t exist on the production servers. In this lesson, I’ll show you how to use npm scripts to deploy your node.js application to a newly-provisioned server via Vagrant for validation before going to production.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?