<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>server &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:server</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 13:04:07 +0000</pubDate>
    <item>
      <title>Run a basic web server locally.</title>
      <link>https://personaljournal.ca/paulsutton/run-a-basic-web-server-locally</link>
      <description>&lt;![CDATA[Run a basic web server locally.&#xA;&#xA;A few years ago, at the Torbay Tech Jam I was shown a neat way to start up a really basic http web server using python3.&#xA;&#xA;Python 3 Web Server&#xA;&#xA;Using this method I decided to have a go, so that I could share this, as it is linked to this weeks Code Club tutorials.&#xA;&#xA;Note: I am using Debian Linux for this.&#xA;&#xA;So after creating a new directory for the server&#xA;&#xA;mkdir http&#xA;cd http&#xA;&#xA;I created a new file index.html and added a few basic lines of html to this. &#xA;&#xA;html&#xA;body&#xA;h1this is a test line/h1&#xA;/body&#xA;html&#xA;&#xA;Then from the command line entered:&#xA;&#xA;python3 -m http.server 8080&#xA;&#xA;Note: 8080 is the port number, so you can use something different, the default for http is 80.&#xA;&#xA;Then pointing my web browser at &#xA;&#xA;127.0.0.1:8080&#xA;&#xA;I am able to view the page in the web browser.&#xA;&#xA;Hope this is useful, could be useful for testing out what you are learning with Freecodecamp if you don&#39;t want to create Repl for this. &#xA;&#xA;#linux,#debian,#web,#server,#http,#testing&#xA;&#xA;I can be contacted on Mastodon here. &#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;Get a free Repl.it online IDE account here &#xA;Get an Overleaf account here, Online collaborative LaTeX Editor &#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Run a basic web server locally.</p>

<p>A few years ago, at the Torbay Tech Jam I was shown a neat way to start up a really basic http web server using python3.</p>
<ul><li><a href="https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server" rel="nofollow">Python 3 Web Server</a></li></ul>

<p>Using this method I decided to have a go, so that I could share this, as it is linked to this weeks Code Club tutorials.</p>

<p><strong>Note:</strong> I am using Debian Linux for this.</p>

<p>So after creating a new directory for the server</p>

<p>mkdir http
cd http</p>

<p>I created a new file index.html and added a few basic lines of html to this.</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;this is a test line&lt;/h1&gt;
&lt;/body&gt;
&lt;html&gt;
</code></pre>

<p>Then from the command line entered:</p>

<p><strong>python3 -m http.server 8080</strong></p>

<p><strong>Note:</strong> 8080 is the port number, so you can use something different, the default for http is 80.</p>

<p>Then pointing my web browser at</p>

<p>127.0.0.1:8080</p>

<p>I am able to view the page in the web browser.</p>

<p>Hope this is useful, could be useful for testing out what you are learning with Freecodecamp if you don&#39;t want to create Repl for this.</p>

<p><a href="/paulsutton/tag:linux" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">linux</span></a>,<a href="/paulsutton/tag:debian" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">debian</span></a>,<a href="/paulsutton/tag:web" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">web</span></a>,<a href="/paulsutton/tag:server" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">server</span></a>,<a href="/paulsutton/tag:http" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">http</span></a>,<a href="/paulsutton/tag:testing" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">testing</span></a></p>

<p>I can be contacted on Mastodon <a href="https://qoto.org/@zleap/" rel="nofollow">here</a>.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<p>Get a free Repl.it online IDE account <a href="https://repl.it/upgrade/zleap" rel="nofollow">here</a>
Get an Overleaf account <a href="https://www.overleaf.com/?r=2c25324e&rm=t&rs=b" rel="nofollow">here</a>, Online collaborative LaTeX Editor</p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/run-a-basic-web-server-locally</guid>
      <pubDate>Tue, 09 Jun 2020 07:00:00 +0000</pubDate>
    </item>
  </channel>
</rss>