Getting TypeScript Gatsby To Work With Environment Variables At Docker Run Time

Getting TypeScript GatsbyJS To Work With Environment Variables At Docker Run Time

What Is This?

This article will focus specifically on setting up the same environment but with TypeScript support.

Setting Up Our TypeScript Project

gatsby new gatsby-ts-env-vars;
cd gatsby-ts-env-vars;
yarn develop;

Once our project is setup, let’s add the necessary dependencies.

yarn add typescript gatsby-plugin-typescript;
yarn add -D @types/react-helmet;

Now we’ll configure Gatsby to support TypeScript.

File: gatsby-config.js

module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
description: `Kick off your next…


Getting GatsbyJS To Work With Environment Variables At Docker Run Time

Getting GatsbyJS To Work With Environment Variables At Docker Run Time

The Problem


Set Up Continuous Deployments With AWS CodePipeline To Elastic Beanstalk Docker

Continuous Deployments With GitHub, AWS CodePipeline, and AWS Elastic Beanstalk

What

In this article we’re going to walkthrough the process of setting up AWS CodePipeline to automatically deploy our code from GitHub to our existing Docker environment on Elastic Beanstalk.

We’re going to skip the build process and address this in hopefully another walkthrough, but the main focus of this is just to automate our deployments.

Why


How To Package A NodeJS TypeScript App, Build & Deploy The Docker Image To AWS Elastic Beanstalk

How To Deploy A TypeScript NodeJS App With Docker To Amazon Web Service Elastic Beanstalk

Why

Docker is the main reason.

Docker is the main reason for setting up our app because it gives us more control over the Linux environment, what is installed, what it can do, and not be at the mercy of a hosting provides own configured Linux box.

What We’re Accomplishing


Building The ReactJS Frontend To Connect To Your Backend API

Amazon Product Wishlist App

What Are We Building


Create An API That Scrapes Amazon.com With ReactJS & NodeJS

Amazon Product Wishlist App

What Are We Building?

Use-cases

This is a very simple base to be able to do some interesting things with their affiliate program or take advantage of being able to find information about specific products in more detail to use for your own internal app.

Some use-cases might include:

  • Creating your own Amazon Product Widget that shows products based on a set of keywords associated to your content
  • Creating a comparison tool to…


Photo by Nadya Spetnitskaya on Unsplash

Breaking Down The Steamroller Algorithm Problem From FreeCodeCamp.org

Goal

[1, [2], [3, [4]]] -> [1, 2, 3, 4]

Real World Use


Three simple to advance hacks to writing Postman tests

Three simple to advance hacks to writing Postman tests

Audit Your API

If you’re going to take on an existing project, it’s always a good idea to factor in an audit of the API, even if there is documentation.

Don’t always trust the API Documentation. Do an Audit.

A client may not like it, but it’s better to find out problems at the beginning…


How To Automatically Deploy React To Firebase Hosting With CircleCI

Deploy React To Firebase With CircleCI — How To Automatically Deploy React To Firebase Hosting With CircleCI

What We’re Doing

Why Though?

“Boils down to saving time.”

Sometimes developers don’t run unit tests and double check their code to make sure things are working correctly.

Requirements

  • NodeJS — 10.16.3
  • GitHub Account
  • CircleCI Account Linked With GitHub

Create React App

npx create-react-app c;

Initial Jest Test

yarn run test --watchAll=false; # npm run test--watchAll=false;# Expected Output
# yarn run v1.16.0
# $ react-scripts test --watchAll=false
# PASS…


3 Ways to do Recursive HTTP requests with callbacks, promises, and async/await.

Recursive HTTP Requests With Callbacks, Promises, & Async/Await

Scenario

And yes I know there might be a more efficient way to do this GraphQL but that might not solve making multiple queries to multiple APIs.

API

Manny

Web Application / Full Stack JavaScript Developer & Aspiring DevOps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store