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

Developing A GraphQL API With Node.js And MongoDB

While REST APIs are amongst the most popular when it comes to client consumption, they are not the only way to consume data and they aren’t always the best way. For example, having to deal with many endpoints or endpoints that return massive amounts of data that you don’t need are common. This is where GraphQL comes in.

With GraphQL you can query your API in the same sense that you would query a database. You write a query, define the data you want returned, and you get what you requested. Nothing more, nothing less. I actually had the opportunity to interview the co-creator of GraphQL on my podcast in an episode titled, GraphQL for API Development, and in that episode we discuss GraphQL at a high level.

You might remember that I wrote a tutorial titled, Getting Started with GraphQL Development Using Node.js which focused on mock data and no database. This time around we’re going to take a look at including MongoDB as our NoSQL data layer.

Read More

Developing A RESTful API With Golang And A MongoDB NoSQL Database

If you’ve been following along, you’re probably familiar with my love of Node.js and the Go programming language. Over the past few weeks I’ve been writing a lot about API development with MongoDB and Node.js, but did you know that MongoDB also has an official SDK for Golang? As of now the SDK is in beta, but at least it exists and is progressing.

The good news is that it isn’t difficult to develop with the Go SDK for MongoDB and you can accomplish quite a bit with it.

In this tutorial we’re going to take a look at building a simple REST API that leverages the Go SDK for creating data and querying in a MongoDB NoSQL database.

Read More

Using Hapi.js, Mongoose, And MongoDB To Build A REST API

To continue on my trend of MongoDB with Node.js material, I thought it would be a good idea to use one of my favorite Node.js frameworks. Previously I had written about using Express.js with Mongoose, but this time I wanted to evaluate the same tasks using Hapi.js.

In this tutorial we’re going to develop a simple RESTful API using Hapi.js, Joi and Mongoose as the backend framework, and MongoDB as the NoSQL database. Rather than just using Hapi.js as a drop in framework replacement, I wanted to improve upon what we had previously seen, by simplifying functions and validating client provided data.

Read More

Hash Password Data In MongoDB With Mongoose And Bcrypt

When creating a web application that handles user information it is a good idea to protect anything considered sensitive rather than storing it as plaintext within a database. The goal is to make it as difficult as possible for a malicious person to obtain access to this sensitive information. Rather than encrypting sensitive information with the knowledge that it can one day become decrypted, it is better to hash this sensitive data instead because hashing is a one-way process.

In this tutorial we’re going to take a look at hashing password data with bcryptjs before storing it in a MongoDB NoSQL database with Mongoose and Node.js.

Read More

Building A REST API With MongoDB, Mongoose, And Node.js

About a week or so ago I had written a tutorial titled, Getting Started with MongoDB as a Docker Container Deployment, which focused on the deployment of MongoDB. In that tutorial we saw how to interact with the MongoDB instance using the shell client, but what if we wanted to actually develop a web application with MongoDB as our NoSQL database?

In this tutorial we’re going to see how to develop a REST API with create, retrieve, update, and delete (CRUD) endpoints using Node.js and the very popular Mongoose object document modeler (ODM) to interact with MongoDB.

Read More

Query A GraphQL API With Vue.js And Axios

I’ve written quite a bit of content around developing a GraphQL API with various programming technologies such as Node.js, Golang, and Java. Heck, I even wrote an eBook on the subject titled, Web Services for the JavaScript Developer. However, I haven’t really produced any content around interacting with those APIs using modern frameworks and client facing technologies, only cURL and Postman.

So how do you interact with a GraphQL API using something like Angular, React, or Vue.js?

There are a lot of frameworks to cover, but in this particular tutorial we’re going to see how to use Vue.js and simple JavaScript to interact with a GraphQL API.

Read More

Perform Different Text Animations With jQuery

When it comes to my name, there is often a lot of confusion. On social media sites such as Twitter, GitHub, and similar, I often go by nraboy which is the first character of my first name (Nic) followed by my last name (Raboy). When people see that, they often think of The National Rifle Association (NRA), which is obviously unrelated to what I’m trying to present myself as. However, due to the NRA acronym being similar to my online handles, I get included on a lot of crazy conversations that I really don’t want to be a part of. In fact, it is one of the main reasons why the blog was rebranded from blog.nraboy.com to thepolyglotdeveloper.com.

Out of this I decided to create an animation showing the obvious. Rather than putting my video editing skills to the test, I decided to create an animation using jQuery and simple JavaScript. In this tutorial we’re going to play around with some text animations using jQuery.

Read More