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

[ bsd3, library ] [ Propose Tags ] [ Report a vulnerability ]

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]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 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 2018-06-25T18:59:31Z
Distributions LTSHaskell:0.1.0.0, Stackage:0.1.0.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1166 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-06-25 [all 1 reports]

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