Download this file
| 1 | import FoundationEssentials |
| 2 | import TodoApp |
| 3 | |
| 4 | #if canImport(Musl) |
| 5 | import Musl |
| 6 | #elseif canImport(Glibc) |
| 7 | import Glibc |
| 8 | #endif |
| 9 | |
| 10 | let options: Options |
| 11 | do { |
| 12 | options = try Options(arguments: Array(CommandLine.arguments.dropFirst()), environment: ProcessInfo.processInfo.environment) |
| 13 | } catch { |
| 14 | let message = Array("\(error)\n".utf8) |
| 15 | _ = write(2, message, message.count) |
| 16 | exit(2) |
| 17 | } |
| 18 | try await Server.run(options) |
| 19 | |