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] [Publish]

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

Versions 0.1.0.0, 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@codept.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:55:53Z

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.

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