]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
:checkered_flag: Change docs address to localhost for Windows (#1169)
authorCamila Gutierrez <mariacamilagl@users.noreply.github.com>
Thu, 26 Mar 2020 21:22:34 +0000 (22:22 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Mar 2020 21:22:34 +0000 (22:22 +0100)
docs/en/docs/contributing.md
scripts/docs.py

index a08991a1579a114d2748f37a7f3338e65b8a4306..12387106c2c4db2a79f8563a1bec68e1b8ecc1b7 100644 (file)
@@ -201,14 +201,14 @@ During local development, there is a script that builds the site and checks for
 ```console
 $ python ./scripts/docs.py live
 
-<span style="color: green;">[INFO]</span> Serving on http://0.0.0.0:8008
+<span style="color: green;">[INFO]</span> Serving on http://127.0.0.1:8008
 <span style="color: green;">[INFO]</span> Start watching changes
 <span style="color: green;">[INFO]</span> Start detecting changes
 ```
 
 </div>
 
-It will serve the documentation on `http://0.0.0.0:8008`.
+It will serve the documentation on `http://127.0.0.1:8008`.
 
 That way, you can edit the documentation/source files and see the changes live.
 
@@ -280,14 +280,14 @@ Now run the live server for the docs in Spanish:
 // Use the command "live" and pass the language code as a CLI argument
 $ python ./scripts/docs.py live es
 
-<span style="color: green;">[INFO]</span> Serving on http://0.0.0.0:8008
+<span style="color: green;">[INFO]</span> Serving on http://127.0.0.1:8008
 <span style="color: green;">[INFO]</span> Start watching changes
 <span style="color: green;">[INFO]</span> Start detecting changes
 ```
 
 </div>
 
-Now you can go to <a href="http://0.0.0.0:8008" class="external-link" target="_blank">http://0.0.0.0:8008</a> and see your changes live.
+Now you can go to <a href="http://127.0.0.1:8008" class="external-link" target="_blank">http://127.0.0.1:8008</a> and see your changes live.
 
 If you look at the FastAPI docs website, you will see that every language has all the pages. But some are not translated and have a notification about the the translation is missing.
 
index 490f0526483c8de0a9bb8082f02bb4556cc63954..03bf3ca818caf0958f9ef60c04526649c8db3d55 100644 (file)
@@ -245,7 +245,7 @@ def serve():
     os.chdir("site")
     server_address = ("", 8008)
     server = HTTPServer(server_address, SimpleHTTPRequestHandler)
-    typer.echo(f"Serving at: http://0.0.0.0:8008")
+    typer.echo(f"Serving at: http://127.0.0.1:8008")
     server.serve_forever()
 
 
@@ -268,7 +268,7 @@ def live(
         lang = "en"
     lang_path: Path = docs_path / lang
     os.chdir(lang_path)
-    mkdocs.commands.serve.serve(dev_addr="0.0.0.0:8008")
+    mkdocs.commands.serve.serve(dev_addr="127.0.0.1:8008")
 
 
 def update_config(lang: str):