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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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]

Properties

Versions0.1.0.0, 0.1.0.0
Change logCHANGELOG.md
Dependenciesaeson, base (>=4.7 && <5), bytestring, containers [details]
LicenseBSD-3-Clause
Copyright2018, Tom Oram
AuthorTom Oram
Maintainertom@codept.com
CategoryLibrary
Home pagehttps://github.com/tomphp/haskell-cfenv#readme
Bug trackerhttps://github.com/tomphp/haskell-cfenv/issues
Source repositoryhead: git clone https://github.com/tomphp/haskell-cfenv
UploadedMon Jun 25 18:55:53 UTC 2018 by tomoram

Modules

[Index]

Downloads

Maintainers' 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.

Progress

Current State: Early WIP

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>"]