<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Luidy</title>
    <description>The latest articles on DEV Community by Luidy (@luidynaves).</description>
    <link>https://dev.to/luidynaves</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F61915%2F8d901020-2e77-4a7a-b808-2dd2c99cb196.JPG</url>
      <title>DEV Community: Luidy</title>
      <link>https://dev.to/luidynaves</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luidynaves"/>
    <language>en</language>
    <item>
      <title>Do Postman ao Bruno</title>
      <dc:creator>Luidy</dc:creator>
      <pubDate>Wed, 30 Apr 2025 11:00:09 +0000</pubDate>
      <link>https://dev.to/luidynaves/do-postman-ao-bruno-6hd</link>
      <guid>https://dev.to/luidynaves/do-postman-ao-bruno-6hd</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/luidynaves/from-postman-to-bruno-242f"&gt;Versão em Inglês&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Originalmente lançado como uma extensão do Chrome em 2012, o Postman começou como um projeto paralelo de Abhinav Asthana. Ao longo dos anos, o Postman se tornou um companheiro inestimável para fazer requisições e testar APIs. Os arquivos de collection e ambiente do Postman foram compartilhados inúmeras vezes por desenvolvedores.&lt;/p&gt;

&lt;p&gt;A collection do Postman foi projetada para ser um único arquivo contendo todas as requisições de API, scripts de pré-requisição, scripts de pós-requisição, scripts de teste, etc. Os arquivos de ambiente também desempenham um grande papel no ciclo de desenvolvimento, facilitando as trocas de ambiente.&lt;/p&gt;

&lt;p&gt;No entanto, manter uma collection do Postman pode ser desafiador se houver uma quantidade substancial de APIs em equipes com mais de três membros. Um plano pago é necessário para obter colaboração ilimitada no Postman e manter a collection do Postman em sua cloud. Uma equipe que mantém cerca de cinquenta endpoints sob o plano gratuito teria dificuldades para manter a collection atualizada.&lt;/p&gt;

&lt;p&gt;Devido à dificuldade de manter um grande arquivo de collection do Postman versionado no git, era hora de procurar alternativas. O recurso mais importante em um novo API Client seria ser amigável ao git e ter pelo menos as mesmas funcionalidades básicas que o Postman oferece, como scripts, configuração de ambiente, etc.&lt;/p&gt;

&lt;p&gt;O &lt;a href="https://www.usebruno.com/" rel="noopener noreferrer"&gt;Bruno&lt;/a&gt; API Client é um API Client relativamente novo que teve seu primeiro lançamento público em outubro de 2022. O que torna o Bruno único é sua estrutura de collection: em vez de ser apenas um único arquivo, ele é organizado como um projeto &lt;code&gt;nodejs&lt;/code&gt;, com um arquivo principal cercado por vários arquivos de suporte. Cada requisição de API é salva como um arquivo com a extensão &lt;code&gt;.bru&lt;/code&gt;. O Bruno é projetado pra ser developer friendly, facilitando a integração com o Git. Isso significa que você pode gerenciar suas collections do Bruno através de um repositório Git, o que realmente aumenta a colaboração entre os membros da equipe.&lt;/p&gt;

&lt;p&gt;Você pode instalar o Bruno facilmente, seja baixando-o diretamente do &lt;a href="https://www.usebruno.com/downloads" rel="noopener noreferrer"&gt;site oficial&lt;/a&gt; ou usando um &lt;a href="https://docs.usebruno.com/get-started/bruno-basics/download" rel="noopener noreferrer"&gt;gerenciador de pacotes&lt;/a&gt; do sistema operacional, como homebrew, apt ou chocolatey.&lt;/p&gt;

&lt;p&gt;A estrutura da collection do Bruno se assemelha a um projeto &lt;code&gt;nodejs&lt;/code&gt;, tornando a collection colaborativa e fácil de manter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9eqyqoh9axns06xbv28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9eqyqoh9axns06xbv28.png" alt="Bruno Collection Folder Structure" width="454" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Arquivos de Ambiente
&lt;/h2&gt;

&lt;p&gt;No Bruno, os arquivos de ambiente estão associados a uma collection específica e são armazenados na pasta &lt;code&gt;environments&lt;/code&gt;, com cada ambiente salvo em seu próprio arquivo separado. Ao contrário do Postman, onde os arquivos de ambiente podem ser compartilhados entre várias collections, os arquivos de ambiente do Bruno são dedicados a collections individuais, garantindo uma configuração mais organizada e focada.&lt;/p&gt;

&lt;p&gt;O Bruno oferece uma variedade de &lt;a href="https://docs.usebruno.com/variables/overview" rel="noopener noreferrer"&gt;variáveis de ambiente&lt;/a&gt;, incluindo global, environment, collection, folder, request, runtime e process variables. Além disso, ele suporta nativamente arquivos &lt;a href="https://www.npmjs.com/package/dotenv" rel="noopener noreferrer"&gt;dotenv&lt;/a&gt;, permitindo que você armazene informações sensíveis de forma segura em sua máquina local, enquanto as mantém fora do controle de versão com gitignore. Isso torna o gerenciamento de seus dados sensíveis fácil e seguro!&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuração do Arquivo Dotenv
&lt;/h2&gt;

&lt;p&gt;Para começar, basta colocar um arquivo &lt;code&gt;.env&lt;/code&gt; no diretório raiz da sua collection. Agora, vamos configurar uma API Key no arquivo &lt;code&gt;.env&lt;/code&gt;!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;API_KEY = fd79a328afe69b0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Você pode usar a variável &lt;code&gt;API_KEY&lt;/code&gt; em suas requisições, bem como em arquivos de ambiente, referenciando-a assim:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{process.env.API_KEY}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Bibliotecas Externas
&lt;/h2&gt;

&lt;p&gt;Como a collection do Bruno é estruturada como um projeto &lt;code&gt;nodejs&lt;/code&gt;, instalar uma nova biblioteca é apenas um comando &lt;code&gt;npm&lt;/code&gt; de distância. Usar uma biblioteca externa é necessário para habilitar o modo desenvolvedor. No entanto, isso exigiria &lt;a href="https://docs.usebruno.com/testing/script/whitelisting-modules" rel="noopener noreferrer"&gt;adicionar à whitelist&lt;/a&gt; alguns módulos no arquivo &lt;code&gt;bruno.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/cheerio" rel="noopener noreferrer"&gt;Cheerio&lt;/a&gt; é uma biblioteca para analisar respostas HTML que requer adicionar à whitelist algumas de suas dependências, como os módulos &lt;code&gt;vm&lt;/code&gt; e &lt;code&gt;buffer&lt;/code&gt;. Como mostrado abaixo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"moduleWhitelist"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"vm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"buffer"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"filesystemAccess"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"allow"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Considerações Finais
&lt;/h2&gt;

&lt;p&gt;O Bruno API Client é uma ferramenta valiosa para equipes que priorizam o gerenciamento de collections de API Client com uma abordagem voltada para o Git. Seus recursos e estrutura únicos tornam a colaboração mais fácil e eficiente, tornando-o uma ótima escolha para desenvolvedores.&lt;/p&gt;

</description>
      <category>api</category>
      <category>tooling</category>
      <category>testing</category>
      <category>development</category>
    </item>
    <item>
      <title>From Postman to Bruno</title>
      <dc:creator>Luidy</dc:creator>
      <pubDate>Wed, 30 Apr 2025 02:48:08 +0000</pubDate>
      <link>https://dev.to/luidynaves/from-postman-to-bruno-242f</link>
      <guid>https://dev.to/luidynaves/from-postman-to-bruno-242f</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/luidynaves/do-postman-ao-bruno-6hd"&gt;PT-BR Version&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Originally launched as a Chrome extension in 2012, Postman started as a side project by Abhinav Asthana. Over the years, Postman has become an invaluable companion for making requests and testing APIs. Postman collection and environment files has been shared countless times by developers.&lt;/p&gt;

&lt;p&gt;Postman collection was designed to be a single file containing all API requests, pre-request scripts, post-request scripts, test scripts, etc. Environment files also play a big role on development cycle making smoothly environment switches.&lt;/p&gt;

&lt;p&gt;However, maintaining a Postman collection can be challenging if holds a substantially amount of APIs in teams with more than three members. A paid plan is required to get unlimited Postman collaboration to keep Postman collection in their cloud storage. A team maintaining about fifty endpoints under free plan would struggle to keep collection up to date.&lt;/p&gt;

&lt;p&gt;Due to the distress maintaining a large Postman collection file versioned in git, it was time to look for alternatives. The most important feature in a new API Client would be git friendly and at least has same basic features Postman provides like scripts, environment configuration, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.usebruno.com/" rel="noopener noreferrer"&gt;Bruno&lt;/a&gt; API Client is a relatively new API client that had its first public release in October 2022. What makes Bruno unique is its collection structure: instead of being just a single file, it’s organized like a &lt;code&gt;nodejs&lt;/code&gt; project, with a main file surrounded by several supporting files. Each API request is saved as a file with a &lt;code&gt;.bru&lt;/code&gt; extension. Bruno is designed with developers in mind, making it easy to integrate with Git. This means you can manage your Bruno collections through a Git repository, which really boosts collaboration among team members.&lt;/p&gt;

&lt;p&gt;You can easily install Bruno either by downloading it directly from the &lt;a href="https://www.usebruno.com/downloads" rel="noopener noreferrer"&gt;official website&lt;/a&gt; or by using a system &lt;a href="https://docs.usebruno.com/get-started/bruno-basics/download" rel="noopener noreferrer"&gt;package manager&lt;/a&gt; like Homebrew, apt, or Chocolatey.&lt;/p&gt;

&lt;p&gt;Bruno collection structure looks like a &lt;code&gt;nodejs&lt;/code&gt; project making a collection collaboratively and maintainable. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9eqyqoh9axns06xbv28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9eqyqoh9axns06xbv28.png" alt="Bruno Collection Folder Structure" width="454" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment Files
&lt;/h2&gt;

&lt;p&gt;In Bruno, environment files are associated with a specific collection and are stored in the &lt;code&gt;environments&lt;/code&gt; folder, with each environment saved in its own separate file. Unlike Postman, where environment files can be shared across multiple collections, Bruno's environment files are dedicated to individual collections, ensuring a more organized and focused setup.&lt;/p&gt;

&lt;p&gt;Bruno offers a variety of &lt;a href="https://docs.usebruno.com/variables/overview" rel="noopener noreferrer"&gt;environment variables&lt;/a&gt;, including global, environment, collection, folder, request, runtime, and process variables. Plus, it natively supports &lt;a href="https://www.npmjs.com/package/dotenv" rel="noopener noreferrer"&gt;dotenv&lt;/a&gt; files, allowing you to store sensitive information securely on your local machine while keeping it out of version control with gitignore. This makes managing your sensitive data both easy and safe!&lt;/p&gt;

&lt;h2&gt;
  
  
  Dotenv File Configuration
&lt;/h2&gt;

&lt;p&gt;To get started, simply place a &lt;code&gt;.env&lt;/code&gt; file in the root directory of your collection. Now, let's configure an API key in the &lt;code&gt;.env&lt;/code&gt; file!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;API_KEY = fd79a328afe69b0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use the &lt;code&gt;API_KEY&lt;/code&gt; variable in your requests as well as in environment files by referencing it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{process.env.API_KEY}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  External Libraries
&lt;/h2&gt;

&lt;p&gt;Since Bruno collection is structured like a &lt;code&gt;nodejs&lt;/code&gt; project, installing a new library is just a &lt;code&gt;npm&lt;/code&gt; command away. Using an external library is required to enable developer mode. However, it would require to &lt;a href="https://docs.usebruno.com/testing/script/whitelisting-modules" rel="noopener noreferrer"&gt;whitelist&lt;/a&gt; some modules in &lt;code&gt;bruno.json&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/cheerio" rel="noopener noreferrer"&gt;Cheerio&lt;/a&gt; is a library to parse html response that requires to whitelist some of its dependencies like &lt;code&gt;vm&lt;/code&gt; and &lt;code&gt;buffer&lt;/code&gt; modules. Like shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"moduleWhitelist"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"vm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="s2"&gt;"buffer"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"filesystemAccess"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"allow"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Bruno API Client is a valuable tool for teams that prioritize managing API client collections with a Git-first approach. Its unique features and structure make collaboration easier and more efficient, making it a great choice for developers.&lt;/p&gt;

</description>
      <category>api</category>
      <category>tooling</category>
      <category>testing</category>
      <category>development</category>
    </item>
  </channel>
</rss>
