Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default preview server port #373

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Tests/SwiftDocCUtilitiesTests/Utility/LogHandleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
========================================
"""
)
Expand All @@ -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
========================================
"""
)
Expand Down