Repository: apple/swift-docc (swift)

Issue:
The default 8000 port may conflict with existing local web server ports.
### Feature Name

Change the default web port from 8000 to something else.

### Description

The default 8000 port may conflict with existing local web server ports.
Maybe there are other ports considerable like 114, 514, 1919, 810, 114514, etc.

### Motivation

_No response_

### Importance

The default 8000 port may conflict with existing local web server ports.

### Alternatives Considered

_No response_

Pull request:
<!--
If you're opening a PR to cherry-pick a change for a release branch, use this template instead:
https://github.com/apple/swift-docc/blob/main/.github/PULL_REQUEST_TEMPLATE/CHERRY_PICK.md
-->

Bug/issue #, if applicable: 

Close #371 

Source: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=http

Thanks @amartini51 for providing the source explanation

## Summary

Update default preview server port

## Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

- [x] Ran the `./bin/test` script and it succeeded
- [x] Updated documentation if necessary

Patch:
diff --git a/README.md b/README.md
index 10a8b42b76..c2e445af3d 100644
--- a/README.md
+++ b/README.md
@@ -227,12 +227,12 @@ Input: ~/Developer/swift-docc/Sources/SwiftDocC/SwiftDocC.docc
 Template: ~/Developer/swift-docc-render-artifact/dist
 ========================================
 Starting Local Preview Server
-   Address: http://localhost:8000/documentation/swiftdocc
+   Address: http://localhost:8080/documentation/swiftdocc
 ========================================
 Monitoring ~/Developer/swift-docc/Sources/SwiftDocC/SwiftDocC.docc for changes...
 ```
 
-And if you navigate to <http://localhost:8000/documentation/swiftdocc> you'll see
+And if you navigate to <http://localhost:8080/documentation/swiftdocc> you'll see
 the rendered documentation for `SwiftDocC`.
   
 ## Versioning
diff --git a/Sources/SwiftDocCUtilities/ArgumentParsing/Options/PreviewOptions.swift b/Sources/SwiftDocCUtilities/ArgumentParsing/Options/PreviewOptions.swift
index b67658559f..691da92d37 100644
--- a/Sources/SwiftDocCUtilities/ArgumentParsing/Options/PreviewOptions.swift
+++ b/Sources/SwiftDocCUtilities/ArgumentParsing/Options/PreviewOptions.swift
@@ -27,13 +27,13 @@ public struct PreviewOptions: ParsableArguments {
 
     /// The port number to use for the preview web server.
     ///
-    /// Defaults to `8000`.
+    /// Defaults to `8080`.
     @Option(
         name: .shortAndLong,
         help: ArgumentHelp(
             "Port number to use for the preview web server.",
             valueName: "port-number"))
-    public var port: Int = 8000
+    public var port: Int = 8080
 
     /// The options used when configuring the preview server for external connections.
     ///


Test patch:
diff --git a/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift b/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift
index d002b5a3c3..ddaa504ec1 100644
--- a/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift
+++ b/Tests/SwiftDocCUtilitiesTests/PreviewActionIntegrationTests.swift
@@ -102,7 +102,7 @@ class PreviewActionIntegrationTests: XCTestCase {
 //                tlsCertificateChain: nil,
 //                serverUsername: nil,
 //                serverPassword: nil,
-//                port: 8000, // We ignore this value when we set the `bindServerToSocketPath` property below.
+//                port: 8080, // We ignore this value when we set the `bindServerToSocketPath` property below.
 //                createConvertAction: createConvertAction) else {
 //            XCTFail("Could not create preview action from parameters")
 //            return
@@ -158,8 +158,8 @@ class PreviewActionIntegrationTests: XCTestCase {
 //                let previewInfoEnd = logOutput[previewInfoStart...].range(of: "\n=====")?.lowerBound {
 //                XCTAssertEqual(logOutput[previewInfoStart..<previewInfoEnd], """
 //                Starting Local Preview Server
-//                \t Address: http://localhost:8000/documentation/mykit
-//                \t          http://localhost:8000/tutorials/overview
+//                \t Address: http://localhost:8080/documentation/mykit
+//                \t          http://localhost:8080/tutorials/overview
 //                """)
 //            } else {
 //                XCTFail("Missing preview information in log/print output")
@@ -456,7 +456,7 @@ class PreviewActionIntegrationTests: XCTestCase {
                 tlsCertificateChain: nil,
                 serverUsername: nil,
                 serverPassword: nil,
-                port: 8000, // We ignore this value when we set the `bindServerToSocketPath` property below.
+                port: 8080, // We ignore this value when we set the `bindServerToSocketPath` property below.
                 createConvertAction: createConvertAction) else {
             XCTFail("Could not create preview action from parameters")
             return
diff --git a/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift b/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift
index fe4ce4f6c1..469824ffc1 100644
--- a/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift
+++ b/Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift
@@ -31,7 +31,7 @@ class LogHandleTests: XCTestCase {
         handle.write("""
             ========================================
             Starting Local Preview Server
-                Address: http://localhost:8000/documentation/my-framework
+                Address: http://localhost:8080/documentation/my-framework
             ========================================
             """
         )
@@ -46,7 +46,7 @@ class LogHandleTests: XCTestCase {
         XCTAssertEqual(text, """
             ========================================
             Starting Local Preview Server
-                Address: http://localhost:8000/documentation/my-framework
+                Address: http://localhost:8080/documentation/my-framework
             ========================================
             """
         )