While writing our own internal documentation at CarDash, we found that many of our developers had different strategies for handling their AWS keys. In this article, we’ll show you some of the best strategies for managing your AWS keys.
The two AWS keys that you probably care about are
AWS_SECRET_ACCESS_KEY. The AWS CLI is pretty flexible with how you give it these keys.
Adding those keys to your environment is probably the easiest and most common way to do it. …
There are many advantages to using a serverless architecture and there are hundreds of excellent articles extolling its virtues, but one painful downside is the often-slow response time of serverless functions that are infrequently used.
This is because on occasion, the container that created the function does not get reused. So on some requests, AWS needs to re-provision a container with your code before it can process the request.
For background tasks this obviously isn’t a problem. But if you have a task that is triggered by user input and blocks your app until you receive a response, it’s important…
Heroku is a popular way to deploy you Phoenix application because it’s really easy and has a great command line tool. But what do you do when you need to migrate your database, which is something you probably do all the time? It turns out, there are a lot of options.
The easiest (short-term) option is to simply use the Heroku command line interface. After logging in, you can simply use the following command to migrate your database, just as you would in your local environment:
$ heroku run mix ecto.migrate
Say you built an API that generates public keys, and these keys all need to be unique and hard to guess. The most common way to do this is to use a hash function to generate a random series of numbers and letters. A typical hash looks something like the text below.
A question that often comes up is, “How long does my hash need to be in order to ensure uniqueness?” Most people assume this is a difficult calculation. So they default to some very large number, like a 50-digit hash. …
What should I hold in the Redux store, and what should I save in local state?
But this question is actually too simplistic, because there are also two other ways you can store data for use in a component: static and this.
Let’s go over what each of these, and when you should use them.
When React was first introduced, we were presented with local state. The important thing to know about local state is that when a state value changes, it triggers a re-render.
This state can…
Once you have an app in production, you have to be more careful with your data; Ecto.drop is no longer an option. So what do you do if you run a migration in production that is not compatible with your current dataset? Here’s an example.
Let’s say you ran a migration that adds a new field (we’ll call it :subscription_renew, which is a :boolean) to your all existing users. …
Like most newbies, I started out searching StackOverflow for Git commands, then copy-pasting answers, without really understanding what they did.
As we’re working through a major refactor of Sightline Maps, we noticed that there are many packages and alternate ways to add a Mapbox map to your React app. We’re going to take you through how we did it, and hopefully it’ll save you some time if you find yourself in a similar situation.
Since this is about setting up Mapbox and not a boilerplate Webpack configuration, you can clone this repo to get started with a blank functional app that runs with the command npm start.
The first package we’re going to add is react-leaflet, which also requires leaflet…
Update: True to form, Arunoda responded to the Meteor Forums post on this subject with a Gagarin Guide that details integration testing for pub-sub and more. Definitely worth checking out if you’re serious about testing!
There comes a time in the life of your app when you need to start looking at testing. This is a good thing, as it means people actually use your app and value stability.
So how do you make sure that the change you just made won’t break your app as soon as you deploy it, leading to hours of downtime, angry users, and a…