Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free

environment variables posts

  • By Matthew Setter
    Working with Environment Variables in PHP Working with Environment Variables in PHP

    Environment variables are an excellent way to configure PHP applications because they keep the application’s settings outside of the code. By doing this, it's easier to prevent secure credentials from being exposed, maintain applications, and use applications across multiple environments.

    In this tutorial, you're going to learn about some of the many ways in which environment variables can be set and retrieved in PHP applications. That way, your application can access all the information that it needs, such as API keys, uploaded files, query strings, and form data.

    How to access environment variables in PHP

    Use PHP's Superglobals

    One of the most common ways that environment variables are accessed in PHP is through the use of Superglobals. These are built-in, predefined variables, available in all scopes. Initialised by the PHP runtime, they organise PHP's environment information in a (mostly) logical and efficient way, so that you only need to …

    Read More
  • By Dominik Kundel
    環境変数の設定方法 environment variables - header

    この記事はTwilio Developer AdvocateのDominik Kundelがこちらで執筆した記事を日本語化したものになります。



    dog - wondering




    Windowsの環境 …

    Read More
  • By Dominik Kundel
    Node.jsで環境変数を利用する方法 Environment Variables in Node.js

    この記事はTwilio Developer AdvocateのDominik Kundelがこちらで執筆した記事を日本語化したものになります。

    環境変数は、Node.jsアプリケーションから秘匿性の高い情報にアクセスできる、すばらしい方法です。多くのクラウドホスト(Heroku、Azure、AWS、now.shなど)やNode.jsモジュールでは、環境変数を使用します。例を挙げると、ホストではサーバーがどのポートをリッスンすべきかを指定する PORT 変数を設定します。モジュールは NODE_ENV 変数の値によって異なる動作(ロギングなど)をするかもしれません。






    console.log('The value of PORT is:', proce …
    Read More
  • By Dominik Kundel
    How To Set Environment Variables CP66owhMZeayfuKH2GO2bPS_oOhngyGdAI323rP9xVWDwm-iRQI7XDiucQ5b4ReImcq346dkAXfpNwxW-GWruOggvVYfkTo2CXPwBwwQUO9CNVcXVL74Zy3TzwYXUHGpUW3q7l8E-4

    Este post também está disponível em Português.

    There are some things we just shouldn’t share with our code. These are often configuration values that depend on the environment such as debugging flags or access tokens for APIs like Twilio. Environment variables are a good solution and they are easy to consume in most languages.

    Environment Variables????


    Environment variables, as the name suggests, are variables in your system that describe your environment. The most well known environment variable is probably PATH which contains the paths to all folders that might contain executables. With PATH, you can write just the name of an executable rather than the full path to it in your terminal since the shell will check the local directory as well as all directories specified in the PATH variable for this executable.

    Aside from ‘built-in’ variables we also have the opportunity to define our own environment …

    Read More
  • By Dominik Kundel
    Comment paramétrer vos variables d'environnement Comment paramétrer vos variables d'environnement

    Il y a certaines choses qu’on ne devrait juste pas partager avec notre code. Il y a souvent des valeurs de configuration qui dépendent de l’environnement, comme les flags de débogage ou les Access Token pour des APIs comme Twilio.

    Les variables d’environnement sont une bonne solution et sont faciles à utiliser dans la plupart des langages.

    Variables d’environnement ????

    gif de chien qui à l'air de s'intéroger

    Les variables d’environnement, comme leur nom le suggère, sont des variables qui décrivent votre environnement dans votre système. La plus connue est sûrement PATH - qui détient les chemins d’accès pour tous les dossiers qui pourraient contenir des exécutables. Avec PATH vous pouvez juste écrire le nom d’un exécutable plutôt qu’un chemin entier pour y arriver dans votre terminal puisque le shell va vérifier le répertoire local ainsi que les répertoires spécifiés dans la variable PATH pour cet exécutable.

    Hormis les variables “built-in” (intégrées), nous avons aussi l’opportunité de …

    Read More
  • By Dominik Kundel
    Como Definir Variáveis de Ambiente Definindo variáveis de ambiente

    Existem algumas coisas que nós não devemos compartilhar em nosso código. Estes geralmente são valores de configurações que dependem do ambiente, tal como debugging flags ou tokens de acesso para APIs como a Twilio. Variáveis de ambiente são uma boa solução e são fáceis de consumir na maioria das linguagens.

    Variáveis de ambiente????

    Gif cachorro confuso

    Variáveis de ambiente, como o nome sugere, são variáveis em seu sistema que descrevem seu ambiente. A variável de ambiente mais conhecida é provavelmente o PATH, que contém o caminho de todas as pastas que podem conter um executável. Com PATH, você pode escrever apenas o nome do executável ao invés do caminho completo no seu terminal, já que o shell vai verificar o diretório local assim como todos os diretórios especificados na variável PATH para esse executável.

    Além de variáveis ‘built-in’, nós também temos a oportunidade de definir nossa própria variável …

    Read More
  • By Phil Nash
    Managing Development Environment Variables Across Multiple Ruby Applications Twilio Bug Logo

    There is one thing I’ve noticed on the Twilio blog since I started here. We are always telling you to store your account SID and auth token in environment variables. What we don’t tend to do is spend too much time talking about how best to manage those environment variables.

    In my previous role, I worked at a digital agency contributing to many different applications over time. Each of these applications relied on various different APIs and stored varying amounts of different credentials. Best practices such as the Twelve Factor App and the constraints of certain hosting platforms like Heroku lead to us using environment variables to store these secrets. It took us a long time to standar …

    Read More
  • Newer
    Sign up and start building
    Not ready yet? Talk to an expert.