def load()

in facia-purger/src/main/scala/com/gu/purge/facia/Config.scala [7:18]


  def load(stage: String): Config = {
    log.info("Loading facia-purger config...")

    val config = for {
      fastlyApiKey <- Option(System.getenv("FastlyAPIKey"))
      fastlyServiceId <- Option(System.getenv("FastlyServiceId"))
    } yield {
      Config(fastlyServiceId, fastlyApiKey)
    }

    config.getOrElse(sys.error("Missing environment variable - FastlyAPIKey & FastlyServiceId must be provided"))
  }