How to easily provision an EC2 Instance and execute remote commands to install Jenkins
Terraform is a tool that allows you to quickly build and provision your Infrastructure as Code and is compatible with many providers such as AWS, Google Cloud, Digital Ocean, and more.
In this article, I will walk you through how we can easily and quickly leverage Terraform to provision an EC2 instance on AWS running Ubuntu and install Jenkins.
How to create a custom date scalar in Apollo GraphQL
Out of the box, GraphQL offers us some default scalar types to work with. These include
ID. In most cases, these are enough for us to work with to build out most applications.
There may come a time where you want to work with custom scalars — for example, working with dates. For most projects, you could get away with storing date values as a
String. But if you would like to make your application a little more robust, you can implement a custom date scalar. …
Simplify your code by using an error handling middleware
Let’s create a basic Express.js application with one endpoint. The endpoint is a
POST method that takes two input parameters,
How to quickly build and deploy a serverless API to AWS
“Pick the right tool for the job” — You’ve probably heard this term before. If your goal is to quickly build a serverless API, maybe for a prototype or some sort, look no further than Claudia.js. With just a few lines of code, you can deploy your project to AWS Lambda and API Gateway. In this article, I’m going to show you how to accomplish that.
Description from Claudia.js themselves:
Easily boost the performance of your application with Redis
We all know retrieving data from memory is wicked fast — a lot faster than retrieving data from disk. This is exactly what Redis allows us to do. It allows us to cache data in memory and use it as a datastore.
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. …
For a full list of methods on the array prototype, check out the MDN web docs on arrays:
I’m going out on a limb and say
map() is one of the most commonly used method on the array prototype. …
There is a saying that “GraphQL doesn’t care how authentication or authorization is implemented”. This can cause a lot of confusion because there are many ways you can handle it.
In this tutorial, I’m going to show you how to implement authentication and authorization in GraphQL the easy way — by authenticating users when building the
context object and implementing authorization on the resolvers.
context object is one that gets passed down to every resolver. This makes it the logical place to perform authentication. Let’s get started!
I have provided starter code so we can focus on implementing the authentication piece and skip setting up the GraphQL server. …
Function-as-a-Service (FaaS) has become very popular over the last few years due so it’s simplicity. With just a few lines of code, we can have an application up and running without having to worry about infrastructure. You also only pay for the resources you consume, which can keep costs down. This makes FaaS a perfect candidate for any function you may only need to run periodically for a short amount of time. For example, we utilize it to generate sales reports every morning at my company.
In this article I’m going to show you how you can quickly build a GraphQL API with Serverless and deploy to AWS. …
With over 45,000 stars on Github and over 300,000 npm weekly downloads, Next.js is currently one of the hottest React framework in the space. It offers server-side rending right out of the box, is optimized for speed, and is relatively quick and easy to get up and running. I won’t dive into all the benefits of Next.js right now so we can focus on building our cryptocurrency tracking application!
In this article, we are going to be building a cryptocurrency tracking application with Next.js and Apollo GraphQL. The application will display the prices of the top 30 cryptocurrencies by fetching data from Nomics API on a polling interval. …
Since being publicly released in 2015, GraphQL has been climbing in popularity and chosen as an alternative to the tried-and-true REST API. Here are a few reasons why I love using GraphQL myself:
There are tons of well written articles discussing the benefits of using GraphQL if you want to learn more. I would also highly recommend doing a deep dive into GraphQL’s documentation if you are new to GraphQL.
In this article, I will show you how to build a searchable query in Apollo GraphQL. …