{"data":{"site":{"siteMetadata":{"title":"Lime Brains","description":"We are The Software House where business questions meet software answers.","url":"https://limebrains.com"}},"markdownRemark":{"html":"<h1>Problem 😱</h1>\n<p>You would like to expose securly 🔓 your local server on the web?</p>\n<p>Default route for this would be to:</p>\n<ul>\n<li>\n<p>configure https</p>\n</li>\n<li>\n<p>configure your router</p>\n</li>\n<li>\n<p>etc.</p>\n</li>\n</ul>\n<hr>\n<h1>Solution 🤓</h1>\n<h2>🎉 🎉 🎉 ngrok 🎉 🎉 🎉</h2>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">Secure tunnels to localhost</code></pre></div>\n<p>Install - <a href=\"https://ngrok.com/download\">link</a>\nor on osx:\n<code class=\"language-text\">brew cask install ngrok</code></p>\n<h2>Usage:</h2>\n<p><code class=\"language-text\">ngrok http 8000</code></p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">ngrok by @inconshreveable                                                                                                                                    <span class=\"token punctuation\">(</span>Ctrl+C to quit<span class=\"token punctuation\">)</span>\n\nSession Status                online\nVersion                       <span class=\"token number\">2.2</span>.8\nRegion                        United States <span class=\"token punctuation\">(</span>us<span class=\"token punctuation\">)</span>\nWeb Interface                 http://127.0.0.1:4040\nForwarding                    http://11e22256.ngrok.io -<span class=\"token operator\">></span> localhost:8000\nForwarding                    https://11e22256.ngrok.io -<span class=\"token operator\">></span> localhost:8000\n\nConnections                   ttl     opn     rt1     rt5     p50     p90\n                              <span class=\"token number\">0</span>       <span class=\"token number\">0</span>       <span class=\"token number\">0.00</span>    <span class=\"token number\">0.00</span>    <span class=\"token number\">0.00</span>    <span class=\"token number\">0.00</span></code></pre></div>\n<p>You can now enter your https or http external url and hit your own server. 🎉</p>\n<h2>Protips:</h2>\n<h3>ngrok comes with dashboard</h3>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">open http://localhost:4040</code></pre></div>\n<p><img src=\"https://i.imgur.com/FGUnPwK.png\" alt=\"dashboard\"></p>\n<h3>reply requests</h3>\n<p><img src=\"https://i.imgur.com/6WD5Ucf.png\" alt=\"reply\"></p>\n<h3>enable basic auth</h3>\n<p><code class=\"language-text\">ngrok http 8000 -auth \"user:password\"</code></p>\n<blockquote>\n<p>you will need to have account for this feature visit <a href=\"https://dashboard.ngrok.com/auth\">https://dashboard.ngrok.com/auth</a>\n<img src=\"https://i.imgur.com/ozTJnIe.png\" alt=\"auth\"></p>\n</blockquote>\n<h3>file based config</h3>\n<p><code class=\"language-text\">nano ~/.ngrok2/ngrok.yml</code></p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">tunnels:\n  service:\n    proto: http\n    addr: 8000</code></pre></div>\n<p>it will start service:</p>\n<p><code class=\"language-text\">ngrok start service</code></p>\n<p><img src=\"https://media.giphy.com/media/12NUbkX6p4xOO4/giphy.gif\" alt=\"magic\"></p>\n<h3>interested? links:</h3>\n<p><a href=\"https://ngrok.com/docs\">docs</a></p>","excerpt":"Problem 😱 You would like to expose securly 🔓 your local server on the web? Default route for this would be to: configure https configure…","frontmatter":{"title":"How can I easily expose my local-server via https?","subtitle":"How can I easily expose my local-server via https?","date":"2018-01-29 14:03","seo":{"title":"How can I easily expose my local-server via https?","description":"How can I easily expose my local-server via https?","noindex":false}},"fields":{"slug":"/blog/2018-01-29T14:03-expose-local-server-with-https/"}}},"pageContext":{"slug":"/blog/2018-01-29T14:03-expose-local-server-with-https/","indexable":false}}