cfenv

A library getting the environment when running on Cloud Foundry https://github.com/tomphp/haskell-cfenv#readme

Version on this page:0.1.0.0
LTS Haskell 12.7:0.1.0.0
Stackage Nightly 2018-08-20:0.1.0.0
Latest on Hackage:0.1.0.0

See all snapshots cfenv appears in

BSD3 licensed by Tom Oram
Maintained by tom@x2k.com

Module documentation for 0.1.0.0

Haskell CFEnv

Build Status

A port of go-cfenv for Haskell.

The purpose of this library is to assist you in writing Haskell apps that run on Cloud Foundry. It provides convenience functions and structures that map to Cloud Foundry environment variable primitives.

Usage

{-# LANGUAGE OverloadedStrings #-}

import Data.String (fromString)
import Data.Monoid (mconcat)

import Web.Scotty

import qualified System.CloudFoundry.Environment as CfEnv

main = do
  app <- CfEnv.current
  
  scotty (CfEnv.port app) $
    get "/" $ do
      html $ mconcat ["<pre>", (fromString (show app)), "</pre>"] 

Missing Functionality

  • Find services by pattern matching
  • Some cases from go-cfenv around handling missing data

Changes

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Haskell PVP.

[Unreleased]

[0.1.0.0] - 2018-06-25

Added

  • isRunningOnCf, lookupCurrent and current IO functions
  • withTag, withName and withLabel service searching functions
  • credentialString function for extracting credentials for services
Depends on 4 packages:
comments powered byDisqus