{"id":8846,"date":"2020-02-28T16:34:00","date_gmt":"2020-02-28T19:34:00","guid":{"rendered":"https:\/\/geekblogti.wpengine.com\/?p=8846"},"modified":"2024-09-24T18:23:10","modified_gmt":"2024-09-24T21:23:10","slug":"heroku","status":"publish","type":"post","link":"https:\/\/www.geekhunter.com/pt/blog\/heroku\/","title":{"rendered":"Heroku: o que \u00e9 e como funciona"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Heroku: o que \u00e9? onde vive? do que se alimenta?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nesse artigo voc\u00ea vai descobrir, de uma vez por todas, o que \u00e9 essa plataforma!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Criei um passo a passo para voc\u00ea criar uma api b\u00e1sica para servir de exemplo pr\u00e1tico! Bora? \ud83d\ude09 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-o-que-heroku\"><strong>O que \u00e9 Heroku<\/strong>?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Heroku \u00e9 uma plataforma nuvem que faz deploy de v\u00e1rias aplica\u00e7\u00f5es back-end seja para hospedagem, testes em produ\u00e7\u00e3o ou escalar as suas aplica\u00e7\u00f5es. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tamb\u00e9m tem integra\u00e7\u00e3o com o GitHub, deixando o uso mais f\u00e1cil e com containers denominados <a href=\"https:\/\/www.heroku.com\/dynos\">Dyno<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-servi-os-suportados-e-hospedagem\"><strong>Servi\u00e7os suportados e hospedagem<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Muitos preferem utilizar essa plataforma pela quantidade de servi\u00e7os que a heroku suporta. Como as aplica\u00e7\u00f5es feitas em:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" label=\"Node.js (abre numa nova aba)\" href=\"https:\/\/www.geekhunter.com\/pt\/blog\/por-que-usar-node-js-uma-justificativa-passo-a-passo\/\" target=\"_blank\">Node.js<\/a>;<\/li><li><a rel=\"noreferrer noopener\" aria-label=\"Ruby (abre numa nova aba)\" href=\"https:\/\/www.geekhunter.com\/pt\/blog\/linguagem-ruby\/\" target=\"_blank\">Ruby<\/a>;<\/li><li><a rel=\"noreferrer noopener\" aria-label=\"Java (abre numa nova aba)\" href=\"https:\/\/www.geekhunter.com\/pt\/blog\/tudo-sobre-java\/\" target=\"_blank\">Java<\/a>;<\/li><li><a rel=\"noreferrer noopener\" aria-label=\"Php (abre numa nova aba)\" href=\"https:\/\/www.geekhunter.com\/pt\/blog\/boas-praticas-de-programacao-em-php\/\" target=\"_blank\">Php<\/a>;<\/li><li><a rel=\"noreferrer noopener\" aria-label=\"Python (abre numa nova aba)\" href=\"https:\/\/www.geekhunter.com\/pt\/blog\/fundamentos-de-python-para-analise-de-dados\/\" target=\"_blank\">Python<\/a>;<\/li><li><a href=\"https:\/\/www.geekhunter.com\/pt\/blog\/golang\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Go (abre numa nova aba)\">Go<\/a>;<\/li><li>Scala;<\/li><li>Clojure.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Uma das formas para hospedar uma aplica\u00e7\u00e3o na Heroku \u00e9 por um reposit\u00f3rio no GitHub,  uma plataforma de hospedagem de c\u00f3digo fonte. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Se voc\u00ea n\u00e3o usa ainda, corre!  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Primeiro voc\u00ea precisa criar o reposit\u00f3rio e colocar todo o c\u00f3digo da aplica\u00e7\u00e3o l\u00e1. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Voc\u00ea tamb\u00e9m pode usar o DropBox, com todas as pastas e arquivos pr\u00e9-definidos. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" width=\"462\" height=\"490\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled.png\" alt=\"Exemplo de cria\u00e7\u00e3o de um reposit\u00f3rio no GitHub\" class=\"wp-image-8847\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled.png 462w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-141x150.png 141w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-94x100.png 94w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-424x450.png 424w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-150x159.png 150w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><figcaption> Exemplo de cria\u00e7\u00e3o de um reposit\u00f3rio no GitHub <\/figcaption><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-heroku-cli\"><strong>Heroku cli<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Para hospedar voc\u00ea precisa do heroku CLI. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Baixe se voc\u00ea tiver <a rel=\"noreferrer noopener\" aria-label=\"windows 64-bit (abre numa nova aba)\" href=\"https:\/\/cli-assets.heroku.com\/heroku-x64.exe\" target=\"_blank\">windows 64-bit<\/a> ou o<a rel=\"noreferrer noopener\" aria-label=\" windows 32-bit (abre numa nova aba)\" href=\"https:\/\/cli-assets.heroku.com\/heroku-x86.exe\" target=\"_blank\"> windows 32-bit<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No Linux, use o comando <code>sudo snap install --classic heroku<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Para MacOS voc\u00ea pode tanto<a href=\"https:\/\/cli-assets.heroku.com\/heroku.pkg\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" baixar o instalador (abre numa nova aba)\"> baixar o instalador<\/a> ou instalar com o comando <code>brew tap heroku\/brew &amp;&amp; brew install heroku<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-hora-do-deploy\"><strong>&nbsp;Hora do deploy<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Vamos iniciar o procedimento de deploy!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Caso a aplica\u00e7\u00e3o que voc\u00ea ir\u00e1 hospedar seja <a href=\"https:\/\/www.geekhunter.com\/pt\/blog\/por-que-usar-node-js-uma-justificativa-passo-a-passo\/\" target=\"_blank\" rel=\"noreferrer noopener\" label=\"node.js (abre numa nova aba)\">node.js<\/a>, voc\u00ea come\u00e7a com <code>npm init<\/code> no terminal ou no cmd com o node e o npm instalado.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Para verificar se o node e o npm est\u00e1 instalado, insira no terminal, <code>npm -v<\/code> e <code>node -v<\/code>, se retornar um output com a vers\u00e3o, est\u00e1 instalado!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"372\" height=\"107\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-1.png\" alt=\"instala\u00e7\u00f5es importantes para usar a plataforma \" class=\"wp-image-8848\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-1.png 372w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-1-150x43.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-1-100x29.png 100w\" sizes=\"(max-width: 372px) 100vw, 372px\" \/><figcaption>  Node e o Npm instalados? Hands ON! <\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Se ainda n\u00e3o tiver instalado,  <a href=\"https:\/\/cli-assets.heroku.com\/heroku.pkg\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"instale  (abre numa nova aba)\">instale <\/a>agora.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ap\u00f3s isso, voc\u00ea pode criar uma pasta <code>src <\/code>para guardar todo o c\u00f3digo da aplica\u00e7\u00e3o ou criar o<code> index.js<\/code> na raiz.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-uma-api-b-sica\">Uma api b\u00e1sica <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Neste passo a passo, irei criar uma api b\u00e1sica com express para servir de exemplo pr\u00e1tico, primeiro precisamos instalar o express com o npm usando <code>npm install express<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"598\" height=\"155\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-2.png\" alt=\"instalando express e npm para usar a heroku \" class=\"wp-image-8849\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-2.png 598w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-2-150x39.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-2-100x26.png 100w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-2-450x117.png 450w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><figcaption>Instalando o express com o npm <\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Para uma request GET b\u00e1sica na raiz \u201c\/\u201d. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">O c\u00f3digo ficar\u00e1 mais ou menos deste jeito:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"191\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-3.png\" alt=\"request na plataforma \" class=\"wp-image-8850\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-3.png 563w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-3-150x51.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-3-100x34.png 100w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-3-450x153.png 450w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Apenas mais um detalhe, vamos criar um arquivo chamado \u201cprocfile\u201d, e l\u00e1 iremos inserir web <code>node caminho\/para\/sua\/index.js<\/code> como este exemplo:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"252\" height=\"85\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-4.png\" alt=\"arquivo criado\" class=\"wp-image-8851\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-4.png 252w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-4-150x51.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-4-100x34.png 100w\" sizes=\"(max-width: 252px) 100vw, 252px\" \/><figcaption>Arquivo criado! <\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Eu subi o c\u00f3digo para o GitHub para facilitar o entendimento, caso queiram ver se estiverem com d\u00favidas ou se deu algo de errado, voc\u00ea ir\u00e1 ser redirecionado para o <a href=\"https:\/\/cli-assets.heroku.com\/heroku.pkg\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"link do reposit\u00f3rio (abre numa nova aba)\">link do reposit\u00f3rio<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ap\u00f3s fazermos nossa api, \u00e9 hora de dar deploy no Heroku, iremos usar o comando <code>heroku create<\/code> para criar um Dyno e gerar um nome para o app.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"580\" height=\"68\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-5.png\" alt=\" deploy no Heroku\" class=\"wp-image-8852\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-5.png 580w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-5-150x18.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-5-100x12.png 100w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-5-450x53.png 450w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><figcaption>Calma, estamos quase l\u00e1! <\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-n-o-se-esque-a-de-fazer-o-login\">N\u00e3o se esque\u00e7a de fazer o login<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No primeiro uso do heroku cli, ele vai pedir para voc\u00ea fazer login.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Aperte qualquer tecla e ele ir\u00e1 abrir uma nova aba no seu navegador padr\u00e3o, voc\u00ea vai fazer login ou criar uma conta nova.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A cria\u00e7\u00e3o da conta n\u00e3o \u00e9 dif\u00edcil, apenas preencha os campos obrigat\u00f3rios de acordo com o que est\u00e1 sendo requisitado. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ap\u00f3s fazer login volte para o terminal e o seu app estar\u00e1 criado, algo parecido com a imagem a seguir.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"146\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-6.png\" alt=\"cria\u00e7\u00e3o de app para dar deploy\" class=\"wp-image-8853\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-6.png 677w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-6-150x32.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-6-100x22.png 100w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-6-600x129.png 600w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-6-450x97.png 450w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><figcaption>Ainda n\u00e3o est\u00e1 pronto para o deploy<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Ele ir\u00e1 ter um nome gerado, o meu foi <code>mysterious-harbor-03490<\/code>, o seu provavelmente ir\u00e1 ser diferente.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mas n\u00e3o se preocupe, se quiser escolher um nome espec\u00edfico para sua aplica\u00e7\u00e3o de uma olhada em <a href=\"https:\/\/devcenter.heroku.com\/articles\/renaming-apps\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"como renomear (abre numa nova aba)\">como renomear<\/a>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Agora s\u00f3 falta mais um comando para voc\u00ea dar deploy em sua aplica\u00e7\u00e3o! <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-quase-l-hein\">Quase l\u00e1, hein! <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Vamos l\u00e1, iremos usar o comando <code>git push heroku master <\/code>e pronto!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Conseguimos dar deploy em nosso app! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Para abrir-lo em uma nova aba do navegador, digite <code>heroku open<\/code> no terminal. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Observa a imagem a seguir de exemplo da nossa api sendo hospedada:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"141\" src=\"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/untitled-7.png\" alt=\"cria\u00e7\u00e3o de deploy na plataforma heroku \" class=\"wp-image-8854\" srcset=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-7.png 574w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-7-150x37.png 150w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-7-100x25.png 100w, https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/untitled-7-450x111.png 450w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><figcaption>YAY!<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;F\u00e1cil, n\u00e9? \ud83d\ude00 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-vantagens-e-desvantagens-da-heroku\">Vantagens e desvantagens da Heroku <\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-vantagens\"><strong>&nbsp;Vantagens<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As vantagens de usar o heroku \u00e9 a produtividade!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Porque possui uma integra\u00e7\u00e3o com o GitHub que deixa o deploy e o controle mais f\u00e1cil.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tamb\u00e9m possui um mercado de add-ons interessante!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Facilita quando voc\u00ea quer, por exemplo, adicionar uma database, ou como um novo plug-in em um site WordPress, apenas tendo que <a href=\"https:\/\/devcenter.heroku.com\/articles\/renaming-apps\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"acessar o Heroku  (abre numa nova aba)\">acessar o Heroku <\/a>e apenas selecionar o addon que voc\u00ea quer instalar. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Al\u00e9m dele prezar pela aten\u00e7\u00e3o focada no desenvolvimento do n\u00facleo da aplica\u00e7\u00e3! E n\u00e3o em servi\u00e7os externos como hospedagem, testes, ou infraestrutura.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Assim deixa bem mais simples de usar, aumentando muito a produtividade do programador salvando umas horas importantes quando se est\u00e1 desenvolvendo.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-desvantagens\"><strong>Desvantagens<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">N\u00e3o tem muitas desvantagens mas acontece que se voc\u00ea hospedar sua aplica\u00e7\u00e3o na vers\u00e3o gratuita e ela ficar inativa por 30 minutos, ir\u00e1 adormecer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Heroku tem 512 mb de ram para hospedar a aplica\u00e7\u00e3o, que n\u00e3o \u00e9 muito ideal para aplica\u00e7\u00f5es muito grandes com alto tr\u00e1fego e requests. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Voc\u00ea pode ver mais informa\u00e7\u00f5es sobre os <a href=\"https:\/\/www.heroku.com\/pricing\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"planos de hospedagem (abre numa nova aba)\">planos de hospedagem<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-continue-estudando-a-heroku\"><strong>Continue estudando a Heroku! <\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Se voc\u00ea tiver mais d\u00favidas e se quiser aprofundar, d\u00ea uma olhada no <a rel=\"noreferrer noopener\" aria-label=\"podcast oficial da Heroku (abre numa nova aba)\" href=\"https:\/\/www.heroku.com\/podcasts\/codeish\" target=\"_blank\">podcast oficial da Heroku<\/a> e tamb\u00e9m leia a <a href=\"https:\/\/devcenter.heroku.com\/categories\/reference\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"documenta\u00e7\u00e3o completa (abre numa nova aba)\">documenta\u00e7\u00e3o completa<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At\u00e9 a pr\u00f3xima!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Heroku: o que \u00e9? onde vive? do que se alimenta? Nesse artigo voc\u00ea vai descobrir, de uma vez por todas, o que \u00e9 essa plataforma! Criei um passo a passo para voc\u00ea criar uma api b\u00e1sica para servir de exemplo pr\u00e1tico! Bora? \ud83d\ude09 O que \u00e9 Heroku? A Heroku \u00e9 uma plataforma nuvem que faz [&hellip;]<\/p>\n","protected":false},"author":167,"featured_media":8857,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[18],"tags":[],"class_list":["post-8846","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-desenvolvimiento-de-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Heroku: primeiros passos para criar uma API | GeekBlog<\/title>\n<meta name=\"description\" content=\"Heroku: o que \u00e9? onde vive? do que se alimenta? Trouxe um passo a passo para criar uma api b\u00e1sica com express nessa plataforma! Vem ver!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Heroku: o que \u00e9 e como funciona\" \/>\n<meta property=\"og:description\" content=\"Heroku: o que \u00e9? onde vive? do que se alimenta? Nesse artigo voc\u00ea vai descobrir, de uma vez por todas, o que \u00e9 essa plataforma! Criei um passo a passo\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Geekhunter\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/geekhunterbr\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-28T19:34:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-24T21:23:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/Sem-t\u00edtulo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Geekhunter\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@geekhunterbr\" \/>\n<meta name=\"twitter:site\" content=\"@geekhunterbr\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Geekhunter\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/\"},\"author\":{\"name\":\"Geekhunter\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#\\\/schema\\\/person\\\/e88727a754c5d7f14b28da71e761fc91\"},\"headline\":\"Heroku: o que \u00e9 e como funciona\",\"datePublished\":\"2020-02-28T19:34:00+00:00\",\"dateModified\":\"2024-09-24T21:23:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/\"},\"wordCount\":895,\"publisher\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/Sem-t\u00edtulo.png\",\"articleSection\":[\"Desenvolvimiento de software\"],\"inLanguage\":\"pt-BR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/\",\"url\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/\",\"name\":\"Heroku: primeiros passos para criar uma API | GeekBlog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/Sem-t\u00edtulo.png\",\"datePublished\":\"2020-02-28T19:34:00+00:00\",\"dateModified\":\"2024-09-24T21:23:10+00:00\",\"description\":\"Heroku: o que \u00e9? onde vive? do que se alimenta? Trouxe um passo a passo para criar uma api b\u00e1sica com express nessa plataforma! Vem ver!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/heroku\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/Sem-t\u00edtulo.png\",\"contentUrl\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/Sem-t\u00edtulo.png\",\"width\":750,\"height\":410,\"caption\":\"o que \u00e9 heroku e como funciona\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/heroku\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mundo TI\",\"item\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/category\\\/mundo-ti\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Desenvolvimiento de software\",\"item\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/category\\\/mundo-ti\\\/desenvolvimiento-de-software\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Heroku: o que \u00e9 e como funciona\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/\",\"name\":\"Blog de TI\",\"description\":\"Dicas para o RH e profissionais da \u00e1rea TI\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#organization\",\"name\":\"GeekHunter\",\"url\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/icon-1.png\",\"contentUrl\":\"https:\\\/\\\/www.geekhunter.com/pt/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/icon-1.png\",\"width\":300,\"height\":300,\"caption\":\"GeekHunter\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/geekhunterbr\\\/\",\"https:\\\/\\\/x.com\\\/geekhunterbr\",\"https:\\\/\\\/www.instagram.com\\\/geekhunterbr\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/geekhunter-brasil\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@GeekHunterOfficial\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/#\\\/schema\\\/person\\\/e88727a754c5d7f14b28da71e761fc91\",\"name\":\"Geekhunter\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09a0f76de8cf1fa3621f8b73417ce43344b42e1324a07a9af24f57c5eef49840?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09a0f76de8cf1fa3621f8b73417ce43344b42e1324a07a9af24f57c5eef49840?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09a0f76de8cf1fa3621f8b73417ce43344b42e1324a07a9af24f57c5eef49840?s=96&d=mm&r=g\",\"caption\":\"Geekhunter\"},\"url\":\"https:\\\/\\\/www.geekhunter.com\\\/pt\\\/blog\\\/author\\\/matias\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Heroku: primeiros passos para criar uma API | GeekBlog","description":"Heroku: o que \u00e9? onde vive? do que se alimenta? Trouxe um passo a passo para criar uma api b\u00e1sica com express nessa plataforma! Vem ver!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/","og_locale":"pt_BR","og_type":"article","og_title":"Heroku: o que \u00e9 e como funciona","og_description":"Heroku: o que \u00e9? onde vive? do que se alimenta? Nesse artigo voc\u00ea vai descobrir, de uma vez por todas, o que \u00e9 essa plataforma! Criei um passo a passo","og_url":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/","og_site_name":"Blog Geekhunter","article_publisher":"https:\/\/www.facebook.com\/geekhunterbr\/","article_published_time":"2020-02-28T19:34:00+00:00","article_modified_time":"2024-09-24T21:23:10+00:00","og_image":[{"width":750,"height":410,"url":"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/Sem-t\u00edtulo.png","type":"image\/png"}],"author":"Geekhunter","twitter_card":"summary_large_image","twitter_creator":"@geekhunterbr","twitter_site":"@geekhunterbr","twitter_misc":{"Escrito por":"Geekhunter","Est. tempo de leitura":"5 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#article","isPartOf":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/"},"author":{"name":"Geekhunter","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#\/schema\/person\/e88727a754c5d7f14b28da71e761fc91"},"headline":"Heroku: o que \u00e9 e como funciona","datePublished":"2020-02-28T19:34:00+00:00","dateModified":"2024-09-24T21:23:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/"},"wordCount":895,"publisher":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#organization"},"image":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/Sem-t\u00edtulo.png","articleSection":["Desenvolvimiento de software"],"inLanguage":"pt-BR"},{"@type":"WebPage","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/","url":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/","name":"Heroku: primeiros passos para criar uma API | GeekBlog","isPartOf":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#primaryimage"},"image":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/Sem-t\u00edtulo.png","datePublished":"2020-02-28T19:34:00+00:00","dateModified":"2024-09-24T21:23:10+00:00","description":"Heroku: o que \u00e9? onde vive? do que se alimenta? Trouxe um passo a passo para criar uma api b\u00e1sica com express nessa plataforma! Vem ver!","breadcrumb":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.geekhunter.com/pt/blog\/heroku\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#primaryimage","url":"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2020\/01\/Sem-t\u00edtulo.png","contentUrl":"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2020\/01\/Sem-t\u00edtulo.png","width":750,"height":410,"caption":"o que \u00e9 heroku e como funciona"},{"@type":"BreadcrumbList","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/heroku\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.geekhunter.com/pt/blog\/"},{"@type":"ListItem","position":2,"name":"Mundo TI","item":"https:\/\/www.geekhunter.com/pt/blog\/category\/mundo-ti\/"},{"@type":"ListItem","position":3,"name":"Desenvolvimiento de software","item":"https:\/\/www.geekhunter.com/pt/blog\/category\/mundo-ti\/desenvolvimiento-de-software\/"},{"@type":"ListItem","position":4,"name":"Heroku: o que \u00e9 e como funciona"}]},{"@type":"WebSite","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#website","url":"https:\/\/www.geekhunter.com\/pt\/blog\/","name":"Blog de TI","description":"Dicas para o RH e profissionais da \u00e1rea TI","publisher":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.geekhunter.com/pt/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#organization","name":"GeekHunter","url":"https:\/\/www.geekhunter.com\/pt\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.geekhunter.com\/pt\/blog\/wp-content\/uploads\/2024\/10\/icon-1.png","contentUrl":"https:\/\/www.geekhunter.com/pt/blog\/wp-content\/uploads\/2024\/10\/icon-1.png","width":300,"height":300,"caption":"GeekHunter"},"image":{"@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/geekhunterbr\/","https:\/\/x.com\/geekhunterbr","https:\/\/www.instagram.com\/geekhunterbr\/","https:\/\/www.linkedin.com\/company\/geekhunter-brasil\/","https:\/\/www.youtube.com\/@GeekHunterOfficial"]},{"@type":"Person","@id":"https:\/\/www.geekhunter.com\/pt\/blog\/#\/schema\/person\/e88727a754c5d7f14b28da71e761fc91","name":"Geekhunter","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/09a0f76de8cf1fa3621f8b73417ce43344b42e1324a07a9af24f57c5eef49840?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/09a0f76de8cf1fa3621f8b73417ce43344b42e1324a07a9af24f57c5eef49840?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09a0f76de8cf1fa3621f8b73417ce43344b42e1324a07a9af24f57c5eef49840?s=96&d=mm&r=g","caption":"Geekhunter"},"url":"https:\/\/www.geekhunter.com\/pt\/blog\/author\/matias\/"}]}},"_links":{"self":[{"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/posts\/8846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/comments?post=8846"}],"version-history":[{"count":0,"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/posts\/8846\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/media\/8857"}],"wp:attachment":[{"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/media?parent=8846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/categories?post=8846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geekhunter.com/pt/blog\/wp-json\/wp\/v2\/tags?post=8846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}