Category: Web Development

Manage Cross-Origin Resource Sharing In A Node With Hapi Application

April 5, 2019 (Updated) Nic Raboy

To continue down my path of solving the worlds cross-origin resource sharing (CORS) problems, I wanted to adventure into Hapi, a Node.js framework that I've been heavily using lately. If you're not familiar with cross-origin resource sharing, it is something that frequently comes up when you try to use front-end JavaScript to access content from another host or port.

Previously I had written about exploring CORS in an Express with Node.js application. While Express is probably the most popular framework, it certainly isn't the only framework, which is why we're going to take a look at CORS in Hapi.

Read More

Create A Basic Todo List Application With The Vue.js Framework

November 24, 2017 Nic Raboy

When getting started with a new development technology or framework, a basic todo list style application is often in the examples used for learning. It makes a great example because todo lists often make use of a variety of things such as forms, loops, and other binding events, all while remaining short and easy.

We're going to see how to create a very basic todo list that demonstrates components, form binding, loops, and click events, using the Vue.js JavaScript framework.

Read More

Pass Data Between Routes In A Vue.js Web Application

November 22, 2017 Nic Raboy

A few weeks ago I had written about creating routes and navigating a Vue.js web application. It was a basic example of getting around in an application.

Often, when building navigation into your application, you'll find that you need to pass data from one screen to another. For example, maybe you're following the master-detail pattern where you have a list of data and you get more information about a particular item in the list by drilling deeper.

We're going to see how to pass data between routes in a Vue.js web application using a router and URL parameters as well as query parameters.

Read More

Process File Uploads In Node.js With Hapi Framework

November 10, 2017 Nic Raboy

When building a web application, I personally find file uploads to be the most complicated part of the job. For example, how do you accept the files, and what do you do with them after you've received them in the request?

Not too long ago I wrote about accepting file uploads in Node.js sent via Angular. In this example I was using Express and the Multer middleware. What if you're interested in using one of the more modern Node.js frameworks instead of Express?

This time around we're going to explore processing file uploads with Hapi and Node.js.

Read More

Use A Router To Navigate Between Pages In A Vue.js Application

November 8, 2017 Nic Raboy

When building a modern web application, being able to navigate between pages is a necessity. Not to mention it is very important to be able to do so easily. To make this possible, frameworks such as Angular, React, and Vue use what's known as a router and a set of routes. Each possible point of navigation, or page, is a route with its own configuration.

We're going to see how to configure a set of routes and navigate between them using Vue.js and the vue-router library.

Read More

Handling CORS Related Issues In An Express Framework Node.js Web Application

November 6, 2017 Nic Raboy

Proper cross-origin resource sharing (CORS) configuration is one of those things that is completely necessary when building a RESTful API, but also one of those things that is a total pain in the butt when it comes to prototyping an application. CORS related errors are common when testing a web application where the front-end JavaScript layer exists on a different port or host than the API that it tries to access.

Previously I had written about configuring cross-origin resource sharing via a Golang RESTful API, but this time we're going to explore the same using Node.js and Express Framework.

Read More

Handling CORS In A Golang Web Application

October 30, 2017 Nic Raboy

If you've ever spent time building RESTful APIs, you've probably come across cross-origin resource sharing (CORS) issues at some time or another. Often clients will receive errors when trying to interact with an API from a domain or port different from the actual API. Back in the day I had written a hacky article on getting past these CORS issues by manipulating the browser settings. However, it is best to tackle these issues at the source.

We're going to see how to change the cross-origin resource sharing configuration in a Golang web application that uses the mux package.

Read More