hello.js

var please = require('share');
console.log('thank you');

Wednesday, 23 May, 2018 UTC

express: Twitter Authentication with Node.js, Express and Passport

express: Twitter Authentication with Node.js, Express and Passport

In this lesson, I will teach you how to authenticate user using passport-twitter strategy and save the twitter profile in the MongoDB. ... more


Tuesday, 22 May, 2018 UTC

express: User Login with Nodejs, Express and MongoDB

express: User Login with Nodejs, Express and MongoDB

In this lesson, You will learn how to find record from MongoDB and compare the user password with plain text password. I will also teach you how to generate a json web token by using user payload object. ... more


Tuesday, 22 May, 2018 UTC

express: User Registration with Nodejs, Express, and MongoDB

express: User Registration with Nodejs, Express, and MongoDB

In this lesson, you will learn how to implement user registration for JSON Web Token authentication. I will show you how to save record in MongoDB using mongoose package. You will also learn how to encrypt the user's password. ... more


Monday, 21 May, 2018 UTC

express: JSON Web Token Authentication with Nodejs, Express, and Passport

express: JSON Web Token Authentication with Nodejs, Express, and Passport

Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. Passport-jwt is a passport strategy for authenticating with a JSON Web Token. This module ... more


Monday, 21 May, 2018 UTC

javascript: Understand common misconceptions about ES6's const keyword

javascript: Understand common misconceptions about ES6's const keyword

Values assigned with `let` and `const` are seen everywhere in JavaScript. It's become common to hear them explained like so: > "`const` creates an constant (immutable) binding while bindings created with `let` can be changed (mutated) without ... more


Tuesday, 15 May, 2018 UTC

javascript: Create your own snippets in Visual studio code

javascript: Create your own snippets in Visual studio code

In this lesson, we will take a look at the `user snippets` feature of Visual studio code to expedite our workflow. User snippets are also a great way to customize the editor to your liking and add custom snippets that you wished were there out-of-the-box. ... more


Monday, 14 May, 2018 UTC

javascript: Async keyword in es2016

javascript: Async keyword in es2016

The async keyword is a syntactic sugar and a powerful tool to simply our asynchronous code. In this lesson we will look at how we can leverage the new `async` keyword to write clean and consistent code. Also, we will contrast and compare it with functions ... more


Monday, 14 May, 2018 UTC

javascript: Destructuring Simple and Nested Objects in JavaScript

javascript: Destructuring Simple and Nested Objects in JavaScript

In this lesson, we will dive into Destructuring objects. Destructuring is a convenient way of extracting multiple values from data stored in (possibly nested) objects and Arrays. It can be used in locations that receive data (such as the left-hand side ... more


Sunday, 13 May, 2018 UTC

[Course] vue: Build Async Vue.js Apps with RxJS

[Course] vue: Build Async Vue.js Apps with RxJS

Vue.js is an amazing framework that can easily update and reflect user input using templates and data-binding. But there are many scenarios where complex asynchronous behaviors (like loading data, handling "pending" states, timeouts, etc) are ... more


Saturday, 12 May, 2018 UTC

[Course] vue: Offline-First Progressive Web Apps (PWA) in Vue.js

[Course] vue: Offline-First Progressive Web Apps (PWA) in Vue.js

Progressive Web Apps are just Web pages, but with superpowers. They load under uncertain network conditions, even offline. They’re fast and engaging, providing the best user experience. They can be installed on your smartphone if the browser supports ... more


Thursday, 10 May, 2018 UTC

javascript: Maintain Readability for Conditional Assignments with JavaScript IIFEs

javascript: Maintain Readability for Conditional Assignments with JavaScript IIFEs

This lesson will show you how you can use Immediately Invoked Function Expressions (IIFE's) to make conditional assignments more readable and robust ... more


Thursday, 10 May, 2018 UTC

typescript: Getting Started with TypeORM and MySQL

typescript: Getting Started with TypeORM and MySQL

TypeORM is an Object Relational Mapper (ORM) for Node.js written in TypeScript that can be used with TypeScript or JavaScript (ES5, ES6, ES7). It support latest JavaScript features and provide features that help you to develop any kind of applications ... more


Thursday, 10 May, 2018 UTC

node: Setup Local Configuration with Node.js Applications

node: Setup Local Configuration with Node.js Applications

To stop having to change configuration settings in production code and to stop secure information like usernames and password being stored in source control its a good idea to use local configuration files. This lesson explains how to read in the local ... more


Wednesday, 9 May, 2018 UTC

asp-net: Expose Values for Real-time Consumption with SignalR in ASP.NET Core

asp-net: Expose Values for Real-time Consumption with SignalR in ASP.NET Core

If you want to improve a REST API beyond GET/POST&PUT and DELETE the next step would be adding the push functionality to send new data into your web applications. With ASP.NET Core and SignalR you can add this functionality with ease and keep your ... more


Monday, 7 May, 2018 UTC

[Course] javascript: Safer JavaScript with the Maybe Type

[Course] javascript: Safer JavaScript with the Maybe Type

JavaScript’s dynamic typing makes it incredibly flexible. That flexibility can lead to trouble though. When values have the potential to change types or to end up as `null` or `undefined`, that can lead to runtime errors in our code or bizarre bugs that ... more


Monday, 7 May, 2018 UTC

react-native: Add Redux to an Existing React Native Application

react-native: Add Redux to an Existing React Native Application

First, install redux with: `npm install --save redux` and install react-redux with: `npm install --save react-redux` In the top level of your component tree, import `createStore` from redux, and use it to create a new store with a simple reducer: `import ... more


Friday, 4 May, 2018 UTC

javascript: NodeJS Logging using Winston and Papertrail

javascript: NodeJS Logging using Winston and Papertrail

Winston is a popular library for logging within NodeJS applications because it allows you to easily target 3rd party logging solutions, including Papertrail. Papertrail is hosted logging solution which is easy to get started with and can be invaluable ... more


Tuesday, 1 May, 2018 UTC

node: Add Logging to a Node.js Application using Winston

node: Add Logging to a Node.js Application using Winston

Winston is a popular logging library for NodeJS which allows you to customise the output, as well as different logging targets. This lesson covers configuring Winston to run with different levels depending on a Node environment variable as well as enhancing ... more


Saturday, 28 April, 2018 UTC

react: Set up emotion-theming within a ReactJS application

react: Set up emotion-theming within a ReactJS application

This lesson takes a look at the theming aspect of the [emotion-js](https://emotion.sh/) library. Specifically, we'll walk through the steps of setting up a ReactJS application to use a global theme object which contains our styles. By the end of the lesson, ... more


Friday, 27 April, 2018 UTC

microsoft: Install a Node.js Application as a Windows Service

microsoft: Install a Node.js Application as a Windows Service

For a production Windows server it makes sense to run NodeJS applications as a Windows service. This way they can be automatically restarted if the server is rebooted. It also makes it easier to use monitoring tools like datadog to detect if there are ... more


Wednesday, 25 April, 2018 UTC

express: Structure a Node.js Project Feature by Feature

express: Structure a Node.js Project Feature by Feature

For medium sized apps and above, monoliths are really bad - having one big software with many dependencies is just hard to reason about and often leads to spaghetti code.The ultimate solution is to develop small software: divide the whole stack into self-contained ... more


Monday, 23 April, 2018 UTC

react-native: Reduce Long Import Statements in React Native with Absolute Imports

react-native: Reduce Long Import Statements in React Native with Absolute Imports

In large React Native projects, it’s common to have long relative import paths like: `import MyComponent from '../../../screens/MyScreen/MyComponent'` With import paths that go up and down the folder hierarchy like that, it can be confusing to figure ... more


Monday, 23 April, 2018 UTC

javascript: Lazy Load Images on a Website

javascript: Lazy Load Images on a Website

When it comes to websites performance is king. How long it takes for a page to load can mean the difference of millions of dollars for large ecommerce sites. In this lesson we'll use the IntersectionObserver to check when an image is in the viewport to ... more


Thursday, 19 April, 2018 UTC

express: Setup a Web Server in Node.js using Express

express: Setup a Web Server in Node.js using Express

In this lesson, we build a very simple Express server. This server will have a single route that displays the current date and time and a handler for 404 pages. ... more


Thursday, 19 April, 2018 UTC

react: Refactor componentWillReceiveProps() to getDerivedStateFromProps() in React 16.3

react: Refactor componentWillReceiveProps() to getDerivedStateFromProps() in React 16.3

The componentWillReceiveProps() method is being deprecated in future version of React (17). Many of us use this method day-to-day to check for incoming prop changes, store state, and to invoke side effects like logging or fetching data from a server. ... more


Wednesday, 18 April, 2018 UTC

typescript: Narrow Down the Type of Variable with Type Guards in TypeScript

typescript: Narrow Down the Type of Variable with Type Guards in TypeScript

As you write TypeScript, the compiler will intelligently look at the flow of your logic and how it branches out and, if possible, will attempt to narrow down the type of different variables. It starts by inspecting the widest type a variable can have, ... more


Monday, 16 April, 2018 UTC

mocha: Test Driven Development in Nodejs with Mocha and Chai

mocha: Test Driven Development in Nodejs with Mocha and Chai

Test-driven development is a methodology for writing the tests first for a given module and the actual implementation afterward. If you write your tests before your application code, that saves you from the cognitive load of keeping all the implementation ... more


Thursday, 12 April, 2018 UTC

react: Use forwardRef() in React 16.3

react: Use forwardRef() in React 16.3

In this lesson, we look at the new forwardRef() method in React 16.3, and how it helps us forward a ref through a Higher-order component to reference an inner DOM node. Additional Resources: https://reactjs.org/docs/forwarding-refs.html ... more


Sunday, 8 April, 2018 UTC

react: Using createRef() to reference a node in a child component in React 16.3

react: Using createRef() to reference a node in a child component in React 16.3

In this lesson we'll use the new createRef() method to retrieve a node in a child component and pass it back to it's parent component. We'll also show how you can use a ref in a functional component with createRef(). Additional Resources: https://reactjs.org/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components ... more


Tuesday, 3 April, 2018 UTC

react: Reference a node using createRef() in React 16.3

react: Reference a node using createRef() in React 16.3

In this lesson, we look at where we came from with refs in React. Starting with the deprecated string ref pattern, callback refs, and then how to use the new `createRef()` method in React **16.3**. Additional Resources: [refs and the dom](https://reactjs.org/docs/refs-and-the-dom.html ... more