Posts tagged "JavaScript"

Published:

Add Google AdSense to a Single Page App - React, Angular, Vue, Next etc...

I recently integrated Google AdSense into my AngularJS blog and this is how I got it working.
Published:

Next.js 13 Middleware for Authentication and Error Handling on API Routes

This is a quick post to show how to add authentication and error handling middleware to all API routes of a Next.js 13 application.
Published:

JavaScript - Add Event Listener to Multiple Elements in Vanilla JS

This is a super quick post to show how to add an event listener to multiple HTML elements in pure JavaScript.
Published:

Vanilla JS + CSS - Modal Popup (Dialog) Tutorial with Example

This is a quick post to show how easy it is to implement modal popups in pure HTML, CSS and JavaScript.
Published:

JavaScript - Sort an Array of Objects by Property in Vanilla JS

This is a super quick post to show how to sort an array of objects by property value in JavaScript (or TypeScript).
Published:

JavaScript - Initialize Array with Conditional Values or Objects in Vanilla JS

This is a super quick post to show how to initialize an array with conditional values in JavaScript (or TypeScript).
Published:

Vanilla JS - 7 ways to convert a string to a number in JavaScript

Some quick examples of how to convert a string to a number in JavaScript
Published:

Vanilla JS - Create an array with a range of numbers in a JavaScript

Some quick examples of how to generate a range of numbers in an array in JavaScript.
Published:

Vanilla JS - Get the max prop value from an object array in JavaScript

A quick example of how to get the maximum value of a property in an array of objects in JavaScript
Published:

Next.js API - Global Error Handler Example & Tutorial

This is a quick post to show how to implement a global exception handler in a Next.js API.
Published:

Next.js API - Add Middleware to API Routes Example & Tutorial

This is a quick post to show how to add middleware to the request pipeline of a Next.js API so it supports similar functionality to ExpressJS.
Published:

Node.js + Express API - Request Schema Validation with Joi

This is a quick example of how to validate HTTP request data using the joi schema validation library in a Node.js + Express API.
Published:

Node.js - Send Emails via SMTP with Nodemailer

This is a quick example of how to send an email in Node.js using the nodemailer email sending module.
Published:

Node.js - Hash and Verify Passwords with Bcrypt

This is a quick example of how to hash and verify passwords in Node.js using the bcryptjs password hashing library which is a pure JavaScript implementation of the bcrypt password hashing function.
Published:
Last updated:

React Boilerplate - Email Sign Up with Verification, Authentication & Forgot Password

How to build a boilerplate authentication system in React including email sign up & verification, authentication & role based authorization, forgot password & reset password functionality, view & update my profile section, and admin only section for managing all user accounts.
Published:

React + Fetch - Fake Backend Example for Backendless Development

An example of backendless development with React and the Fetch API, includes "pass through" to real backend for unmocked URLs.
Published:

Vue.js - Simple Pagination Example

A simple example of how to implement client-side pagination in Vue.js.
Published:

Vue.js + Node - Server Side Pagination Tutorial & Example

A simple example of how to implement server-side pagination in Vue.js with a Node.js backend API.
Published:

React + Node - Server Side Pagination Tutorial & Example

A simple example of how to implement server-side pagination in React with a Node.js backend API.
Published:

Angular 8 + Node - Server Side Pagination Tutorial & Example

A simple example of how to implement server-side pagination in Angular 8 with a Node.js backend API.
Published:
Last updated:

Node.js - Role Based Authorization Tutorial with Example API

How to build an API with role based authorization / access control in Node.js & JavaScript. Includes example client apps built with Angular, React and Vue.
Published:
Last updated:

NodeJS - Basic Authentication Tutorial with Example API

How to implement Basic HTTP Authentication in Node.js with JavaScript. Includes example client apps built with React, Angular & Vue.
Published:

JavaScript - Pure Pagination Logic in Vanilla JS / TypeScript

Pure pagination logic written in JavaScript and available on npm
Published:
Last updated:

Node.js + Express 4 - JWT Authentication Tutorial with Example API

How to implement JWT authentication in Node.js with Express.js. Includes example client apps built with React, Angular, Vue & Blazor.
Published:
Last updated:

NodeJS + MongoDB - Simple API for Authentication, Registration and User Management

A clean and simple custom NodeJS API for Login, Registration and User Management. Includes example client apps built with React, Angular & Vue, and instructions on testing with Postman and deploying to AWS and Heroku.
Published:

Node - Get Public Key From Private Key with JavaScript

How to get the public key from a private key using JavaScript running on Node. Useful for AWS Key Pairs.
Published:

Plunker - Embed Only Preview Pane

How to embed a plunk showing only the preview pane, plus other display options.
Published:
Last updated:

CSS3 - Sticky Header on Scroll Example

How to add an animated sticky header to a website using almost pure CSS with just a touch of javascript.
Published:

AngularJS - Pagination Example with Logic like Google

Google style pagination logic in AngularJS and JavaScript.
Published:

AngularJS - Google Analytics with the UI Router

This is a quick post to show how to setup Google Analytics page/route tracking in an Angular application that uses the UI Router.
Published:

AngularJS Basic HTTP Authentication Example

An example of how to setup a simple login page with HTTP Basic Authentication using AngularJS, and also keep the user logged in after the page is refreshed.
Published:

Post a simple string value from AngularJS to .NET Web API

How to post a simple string parameter in the body of an HTTP request from AngularJS to ASP.NET Web API
Published:

AngularJS - A Better Way to Implement a Base Controller

The simplest way to setup controller inheritance in AngularJS.
Published:

AngularJS - Reverse Geocoding Directive

This is a little custom AngularJS directive that converts GPS coordinates (latitude/longitude) into an address, otherwise known as reverse geocoding, using the Google Maps API.
Published:

Add HTML5 placeholder support to older browsers

This is a handy javascript function that I use on a lot of my sites to ensure that the html5 placeholder attribute is supported by older browsers.
Published:

jQuery Searchable DropDown - fixes for IE9 bug and dynamically added items

I recently tried out the jQuery Searchable DropDown (v1.0.7) from http://jsearchdropdown.sourceforge.net/ and it worked perfectly except for 2 things:
Published:

Validate date dropdown lists with JavaScript / jQuery

A simple javascript function for validating a date that's input using 3 dropdown lists
Supported by