@@ -24,11 +24,10 @@ public func == (lhs: ServerConfigType, rhs: ServerConfigType) -> Bool {
2424 lhs. environment == rhs. environment
2525}
2626
27- public enum EnvironmentType : String {
28- public static let allCases : [ EnvironmentType ] = [ . production, . staging, . local]
29-
27+ public enum EnvironmentType : String , CaseIterable {
3028 case production = " Production "
3129 case staging = " Staging "
30+ case development = " Development "
3231 case local = " Local "
3332}
3433
@@ -62,6 +61,16 @@ public struct ServerConfig: ServerConfigType {
6261 environment: EnvironmentType . staging
6362 )
6463
64+ public static let development : ServerConfigType = ServerConfig (
65+ apiBaseUrl: URL ( string: " https:// \( Secrets . Api. Endpoint. development) " ) !,
66+ webBaseUrl: URL ( string: " https:// \( Secrets . WebEndpoint. development) " ) !,
67+ apiClientAuth: ClientAuth . development,
68+ basicHTTPAuth: BasicHTTPAuth . development,
69+ graphQLEndpointUrl: URL ( string: " https:// \( Secrets . WebEndpoint. development) " ) !
70+ . appendingPathComponent ( gqlPath) ,
71+ environment: EnvironmentType . development
72+ )
73+
6574 public static let local : ServerConfigType = ServerConfig (
6675 apiBaseUrl: URL ( string: " http://api.ksr.test " ) !,
6776 webBaseUrl: URL ( string: " http://ksr.test " ) !,
@@ -91,6 +100,8 @@ public struct ServerConfig: ServerConfigType {
91100 switch environment {
92101 case . local:
93102 return ServerConfig . local
103+ case . development:
104+ return ServerConfig . development
94105 case . staging:
95106 return ServerConfig . staging
96107 case . production:
0 commit comments