Vapor v4.0.0-beta.3 Release Notes

Release Date: 2019-12-14 // over 4 years ago
  • Example output:

    # TYPE http_requests_total counter
    http_requests_total 0
    http_requests_total{status="200", path="GET /hello/:name", method="GET"} 7
    http_requests_total{status="200", path="GET /metrics", method="GET"} 3
    # TYPE http_request_duration_seconds summary
    http_request_duration_seconds{quantile="0.01"} 0.000115894
    http_request_duration_seconds{quantile="0.05"} 0.000115894
    ...
    

    ⚡️ Updates to RoutingKit beta 3 (#2126)

    ClientResponse, HTTPStatus, and HTTPHeaders are now Codable (#2124)

    Environment variables loaded from .env files can now be accessed immediately after Application has initialized (#2125)

    📦 .env (in same folder as Package.swift)

    FOO=BAR
    

    main.swift

    let app = Application(...)defer { app.shutdown() } let foo = Environment.get("FOO") print(foo) // BAR