This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Easily create port programs for JavaScript interoperation, e.g. with Node
version 1.0.1
license Apache2.0
native-modules False
elm-version 0.17.1 <= v < 0.18.0
Tag 1.0.1
Committed At 2016-11-21 22:34:14 UTC
elm-lang/html 1.1.0 <= v < 2.0.0 1.1.0
elm-lang/core 4.0.5 <= v < 5.0.0 4.0.5


Simple Port Program for Elm

What does this do?

SimplePortProgram exposes only what's necessary to make your Elm functionality interoperate with arbitrary JavaScript.

Deprecated as of Elm 0.18.0 thanks to Platform.program effectively doing the same thing.

For Elm 0.18.0, instead see our Port Program Examples.


Elm 0.17.1 needed a better way to demonstrate how ports work. Though there is some good documentation for Elm, most has revolved around HTML. Examples that don't actually use HTML, for Node JS, still have a significant amount of cruft to hamper a beginner's understanding of how to get a minimal proof of concept working.

Models probably aren't needed for simple use either, so SimplePortProgram provides a way to interoperate without that worry. You only need to concern yourself with the structure of data coming and going to/from Elm, and how to act on messages.

Try it out

Look in the examples folder. It's pretty straightforward.


Official Elm-JavaScript interoperation documentation

Elm Effects

Elm Platform.Cmd v5.0.0

Elm Platform.Sub v5.0.0