Skip to content

deadfoxygrandpa/elm-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Experimental server side Elm package

If you have a Main module, you can run the compiled js file with node automatically.

node elm.js

You can also import the file as a library, setup any ports, and start the program manually.

var Elm = require('./elm.js');

Elm.worker(Elm.Main, {});

The API is still very experimental.

Example

module Main where

import Task exposing (Task,andThen,onError)
import Console
import File

port main : Task x ()
port main =
    File.read "elm-stuff/exact-dependencies.json"
        `andThen` Console.log
        `onError` Console.fatal

For a more in depth example, checkout elm-oracle.

About

Elm server side support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 63.2%
  • Elm 36.8%