Boost logo

Boost :

Subject: Re: [boost] [review] Review of Outcome v2 (Fri-19-Jan to Sun-28-Jan, 2018)
From: Miguel Ojeda (miguel.ojeda.sandonis_at_[hidden])
Date: 2018-01-24 06:18:02


On Tue, Jan 23, 2018 at 11:55 PM, Niall Douglas via Boost
<boost_at_[hidden]> wrote:
>>> 1. No server side extensions are needed. It's a static website.
>>>
>>
>> So, why exactly can't you generate static html?
>
> Most web browsers don't render modern static websites with AJAX,
> accessibility, mobile rendering, semantic search etc from file:// for
> security reasons. The problem is in the web browser, not in the site.
>
> If you're super adverse to running Hugo, the Python 2 program below will
> serve a static website onto localhost for you. Taken from
> https://docs.python.org/2/library/simplehttpserver.html:
>
> ```
> import SimpleHTTPServer
> import SocketServer
>
> PORT = 8000
>
> Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
>
> httpd = SocketServer.TCPServer(("", PORT), Handler)
>
> print "serving at port", PORT
> httpd.serve_forever()
> ```
>
> Start using:
>
> python -m SimpleHTTPServer 8000
>

The file above is not needed (that is an example of usage of the
module) -- just the command line you wrote is enough:

  python -m SimpleHTTPServer 8000

Or for Python 3, even better, binding only to localhost:

  python -m http.server 8000 --bind 127.0.0.1

Not that I agree with something like the Boost docs requiring a
server, but it is even easier to set up one :)

My 2 cents,
Miguel

> Niall
>
> --
> ned Productions Limited Consulting
> http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk