{"id":3133,"date":"2016-07-09T15:04:03","date_gmt":"2016-07-09T14:04:03","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=3133"},"modified":"2021-03-11T09:42:57","modified_gmt":"2021-03-11T08:42:57","slug":"hey-mr-postman-be-on-every-machine","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2016\/07\/hey-mr-postman-be-on-every-machine\/","title":{"rendered":"Hey Mr Postman, be on Every Windows Machine."},"content":{"rendered":"<p>Postman is probably my favorite adhoc HTTP tool for exploring API&#8217;s, testing, debugging etc etc. Often I go to some other machine, and want to test something on there. Oups: Chrome nor Postman is installed =(.<br \/>\nLike <a href=\"https:\/\/www.gamlor.info\/wordpress\/2016\/04\/need-sql-server-management-studio-now-turbo-net-tipps\/\">SSMS<\/a>, I want Postman at my finger tips, on many machines. Why can&#8217;t I just type <code>turbo run postman<\/code>? That would be lovely, no?!<\/p>\n<div id=\"attachment_3202\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/heymrpostman.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3202\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/heymrpostman-1024x672.jpg\" alt=\"With V8 and Chrome to Valhalla!\" width=\"700\" height=\"459\" class=\"size-large wp-image-3202\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/heymrpostman-1024x672.jpg 1024w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/heymrpostman-300x197.jpg 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/heymrpostman-768x504.jpg 768w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/heymrpostman.jpg 1372w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><p id=\"caption-attachment-3202\" class=\"wp-caption-text\">With V8 and Chrome to Valhalla!<\/p><\/div>\n<h2>Create a Postman container<\/h2>\n<p>Well, at the moment there is no packaged Postman on Turbo.net&#8217;s hub. But don&#8217;t worry, you can create your own image. Let&#8217;s start. First, we could start up Chrome, navigate to the store there etc: Oh wait, we can do better. On the command line, give it the URL to open up. That URL can be a Chrome store page. Just Google for &#8220;Postman Chrome Store&#8221;, copy and paste the site&#8217;s URL and there we go:<\/p>\n<p><script src=\"https:\/\/gist.github.com\/7e58108a14c66895bc255db598071442.js?file=fire-chrome-postman.bat\"><\/script><noscript><pre><code class=\"language-batchfile batchfile\">turbo run --name=postman-chrome chrome &quot;https:\/\/chrome.google.com\/webstore\/detail\/postman\/fhbjgbiflinjbdggehcddcbncdddomop?hl=en&quot;<\/code><\/pre><\/noscript><br \/>\nThis pops open the extension add dialog. Confirm the installation.<\/p>\n<p><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/add-extension.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/add-extension-300x217.png\" alt=\"add-extension\" width=\"300\" height=\"217\" class=\"aligncenter size-medium wp-image-3229\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/add-extension-300x217.png 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/add-extension-768x557.png 768w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/add-extension-1024x742.png 1024w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/add-extension.png 1308w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After that, we have Chrome with Postman installed in this container. When we start this container again, Postman is installed there.<\/p>\n<h2>Build a Postman Image<\/h2>\n<p>Now, we actually want a Postman image, not Chrome with Postman installed. We can commit the container to a image and change its launch parameters to start the Postman.<\/p>\n<p>Let&#8217;s do it via a <a href=\"https:\/\/turbo.net\/docs\/reference\/turboscript\">Turbo script<\/a>. With Turbo scripts you can script building new images. Most images on the turbo hub are actually created this way. You can look at the source for most of the images in Github <a href=\"https:\/\/github.com\/turboapps\/turbome\">https:\/\/github.com\/turboapps\/turbome<\/a>.<\/p>\n<p>Our Postman creating script will be way simpler. It can be adopted for other Chrome apps without any problems. Here it is:<br \/>\n<script src=\"https:\/\/gist.github.com\/7e58108a14c66895bc255db598071442.js?file=postman.turbo.me\"><\/script><noscript><pre><code class=\"language-roff roff\"># First we base our image on Chrome.\nlayer chrome\n\n# Let&#039;s give the image the name roman.stoffel@gamlor.info\/postman by default\n# Namespace should be your account name or turbo-org account you own.\nmeta namespace = &quot;roman.stoffel@gamlor.info&quot;\nmeta name = &quot;postman&quot;\n\n# Let&#039;s start chrome, with the Store page open. Ready to add the Postman extension\n# I didn&#039;t find out how to automattically &#039;Accept &amp; Add&#039; the extension. \n# You&#039;ll have to do it manually for now\ncmd (&quot;C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe&quot;,&quot;https:\/\/chrome.google.com\/webstore\/detail\/postman\/fhbjgbiflinjbdggehcddcbncdddomop?hl=en&quot;) \n\n# Ok, let&#039;s start up the Postman Chrome app.\n# The app-id is the same ID you see in the URL of the Chrome app you want to add\nstartup file (&quot;C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe&quot;, &quot;--profile-directory=Default&quot;, &quot;--app-id=fhbjgbiflinjbdggehcddcbncdddomop&quot;) \n<\/code><\/pre><\/noscript><\/p>\n<p>Now, we can run this script to create our Postman image:<br \/>\n<script src=\"https:\/\/gist.github.com\/7e58108a14c66895bc255db598071442.js?file=build-postman.bat\"><\/script><noscript><pre><code class=\"language-batchfile batchfile\">turbo build --no-base --overwrite postman.turbo.me<\/code><\/pre><\/noscript><\/p>\n<p>Unfortunately, I did not find out how to automate Chrome to add an extension automatically. So, you have to click &#8216;Add to Chrome&#8217; and wait until it is added. Then close Chrome to continue the script.<\/p>\n<p>Anyway, now you have a Postman image. Push it to the hub, so you can use it in any computer. Now you can go to any box, type in <code>turbo run [your-account\/postman<\/code> into the command line, and bang, Postman will fire up.<\/p>\n<div id=\"attachment_3205\" style=\"width: 710px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/postman-in-containers.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3205\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/postman-in-containers-1024x659.jpg\" alt=\"One Postman? More Postmen!\" width=\"700\" height=\"450\" class=\"size-large wp-image-3205\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/postman-in-containers-1024x659.jpg 1024w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/postman-in-containers-300x193.jpg 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/postman-in-containers-768x495.jpg 768w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/postman-in-containers.jpg 1590w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><p id=\"caption-attachment-3205\" class=\"wp-caption-text\">One Postman? More Postmen!<\/p><\/div>\n<h2>Make It Fancy<\/h2>\n<p>If the image is for personal use, then you are probably already happy with the result. If you want to share this image across an organization, you might want to add some meta data. You can go to the Turbo.net hub, go to the repository of the image you just pushed. There you can add a nice icon, some explanation etc. <\/p>\n<div id=\"attachment_3221\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/edit-page.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3221\" src=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/edit-page-300x226.png\" alt=\"Adding meta data\" width=\"300\" height=\"226\" class=\"size-medium wp-image-3221\" srcset=\"https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/edit-page-300x226.png 300w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/edit-page-768x578.png 768w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/edit-page-1024x770.png 1024w, https:\/\/www.gamlor.info\/wordpress\/wp-content\/uploads\/2016\/07\/edit-page.png 1232w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3221\" class=\"wp-caption-text\">Adding meta data<\/p><\/div>\n<p>You then can use the <code>turbo installi\/subscribe<\/code> commands to add the Postman image to the start menu etc. That exercise is left for you, the reader ;). Like in my example, <code>turbo installi roman.stoffel@gamlor.info\/postman<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Postman is probably my favorite adhoc HTTP tool for exploring API&#8217;s, testing, debugging etc etc. Often I go to some other machine, and want to test something on there. Oups:&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[268,187],"tags":[300,298,37],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/3133"}],"collection":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/comments?post=3133"}],"version-history":[{"count":37,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/3133\/revisions"}],"predecessor-version":[{"id":3393,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/3133\/revisions\/3393"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=3133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=3133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=3133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}