cfenv: A library getting the environment when running on Cloud Foundry

[ bsd3, library ] [ Propose Tags ]

This is a port of go-cfenv for Golang. 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.


[Skip to Readme]
Versions [faq] 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson, base (>=4.7 && <5), bytestring, containers [details]
License BSD-3-Clause
Copyright 2018, Tom Oram
Author Tom Oram
Maintainer tom@x2k.com
Category Library
Home page https://github.com/tomphp/haskell-cfenv#readme
Bug tracker https://github.com/tomphp/haskell-cfenv/issues
Source repo head: git clone https://github.com/tomphp/haskell-cfenv
Uploaded by tomoram at Mon Jun 25 18:59:31 UTC 2018
Distributions LTSHaskell:0.1.0.0, NixOS:0.1.0.0, Stackage:0.1.0.0
Downloads 298 total (17 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-06-25 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for cfenv-0.1.0.0

[back to package description]

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