Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Fast. Secure. Server Side Swift.
import Compute
@main
struct HelloCompute {
static func main() async throws {
try await onIncomingRequest(handleIncomingRequest)
}
static func handleIncomingRequest(req: IncomingRequest, res: OutgoingResponse) async throws {
let text = "Hello, World."
try await res.status(200).send(text)
}
}HostConnect custom domains
The core library for building apps on Swift Cloud
.package(url: "https://github.com/AndrewBarba/swift-compute-runtime", from: "1.0.0")import Compute
@main
struct App {
static func main() async throws {
try await onIncomingRequest(handleIncomingRequest)
}
static func handleIncomingRequest(req: IncomingRequest, res: OutgoingResponse) async throws {
print("Handling request:", req.url.pathname)
}
}Fetch data in your application
Connect your code to Swift Cloud
Deploy your code to Swift Cloud