mirror of
https://github.com/apple/swift-nio.git
synced 2026-05-20 20:30:36 +00:00
Remove example binaries from products (#1303)
Motivation: Avoid examples being build when using as library. Address https://github.com/apple/swift-nio/issues/1217 Modifications: Remove example binaries from products. Update example section in README, show how to run them. Result: Examples are not being built when running `swift build`
This commit is contained in:
@@ -168,6 +168,18 @@ There are currently several example projects that demonstrate how to use SwiftNI
|
||||
- **WebSocket client** https://github.com/apple/swift-nio/tree/master/Sources/NIOWebSocketClient
|
||||
- **WebSocket server** https://github.com/apple/swift-nio/tree/master/Sources/NIOWebSocketServer
|
||||
|
||||
To build & run them, run following command, replace TARGET_NAME with the folder name under `./Sources`
|
||||
|
||||
```bash
|
||||
swift run TARGET_NAME
|
||||
```
|
||||
|
||||
For example, to run NIOHTTP1Server, run following command:
|
||||
|
||||
```bash
|
||||
swift run NIOHTTP1Server
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
SwiftNIO primarily uses [SwiftPM](https://swift.org/package-manager/) as its build tool, so we recommend using that as well. If you want to depend on SwiftNIO in your own project, it's as simple as adding a `dependencies` clause to your `Package.swift`:
|
||||
|
||||
Reference in New Issue
Block a user