Skip to content

Latest commit

 

History

History
 
 

with-elm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Razzle Elm Example

How to use

Download the example or clone the whole project:

curl https://codeload.github.com/jaredpalmer/razzle/tar.gz/master | tar -xz --strip=2 razzle-master/examples/with-elm
cd with-elm

Install it and run:

yarn install
yarn start

Idea behind the example

This is a basic example of how to use Razzle and Elm, it uses:

src/client.js contains all the js code required to load Elm, you can configure Elm ports here src/server.js the server side, here call elm-static-html-lib with the respective module to render the view


If you want to activate the Elm debug mode or other tooling and debug utilites of Elm edit razzle.config.js:

{
    loader: 'elm-webpack-loader',
    options: { //Edit here
        verbose: true,
        warn: true,
        pathToMake: require('elm/platform').executablePaths['elm-make'],
        forceWatch: true
    }
}

As of Razzle 2.0, you can now use razzle-plugin-elm instead of adding the webpack loaders on your own.