Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Waiting For A Loop Of Async Functions To Finish In Node.js

At the moment Node.js is my web development language of choice, but occasionally I come across something that really grinds my gears. I sometimes find that I’ve fallen into an async hell that screws up a lot of things. For example, maybe I’ve designed an API endpoint that makes a few requests to external services. Before returning data to the client (user), manipulations must be done on the external service data requested. How do we do all this?

Let’s take a look how we would cover these scenarios.

Read More

Using Oauth 2.0 In Your Web Browser With AngularJS

I have a few popular Oauth related posts on my blog. I have one pertaining to Oauth 1.0a, and I have one on the topic of Oauth 2.0 for use in mobile application development. However, I get a lot of requests to show how to accomplish an Oauth 2.0 connection in a web browser using only JavaScript and AngularJS.

We’re going to better explore the process flow behind Oauth 2.0 to establish a secure connection with a provider of our choice. In this particular example we’ll be using Imgur because I personally think it is a great service.

Read More

Session Management In Your Express.js Web Application

I’ve still been doing a lot of fiddling with Express web framework for Node.js. I recently ran into an issue with saving data to sessions because much of the documentation online is outdated and no longer functional. However, I did get it working, and am going to discuss it in this guide.

If you’re not familiar with Express, you may want to take a moment and read my other article regarding installation.

Read More

Handling Apache Cordova Events With Ionic Framework

There will often come a scenario where you need to determine when your application enters the device background and comes back into the foreground. For example, let’s say we wanted to require a password every time the application is shown. We would need to listen for when the application enters the foreground.

Lucky for us, we can make use of the Apache Cordova event listeners to accomplish this task.

Read More