GitXplorerGitXplorer
n

E2

public
26 stars
7 forks
2 issues

Commits

List of commits on branch master.
Unverified
516b9ccd0f8881c4656cdacd76f3f0de203cee94

Update for windows compatibility and added elm-test (#8)

iihistand committed 8 years ago
Unverified
46af1a3abc13db7d80cfc642b96ec6747b2263e0

Update README.md

nnickbalestra committed 8 years ago
Unverified
188e3b4034b8255eef3c4a6ec234b09396408a90

added .node-version

committed 8 years ago
Unverified
ee6fe82c6d02b3ed4b34d55bc4d4d044de778938

readme fix

committed 8 years ago
Unverified
1847523782d19f3ca920f53c4988b5c7cb3f276d

Update README.md

nnickbalestra committed 8 years ago
Unverified
5962eb1c7db445a1f4ccd7d06f9538faa99bf156

Update webpack.config.js

nnickbalestra committed 8 years ago

README

The README file for this repository.

E2

A Simple, Scalable and Easy starting point for full stack web development using JavaScript and Elm.

JavaScript Style Guide

Please read the related blog post: E2: Elm + Express for full-stack web development to know more about this stack and its relative boilerplate.

NOTE! Use the latest version of Node, 6.x.x.

Installation

  1. git clone
  2. npm install

Usage

Development workflow - Hot reload

  1. npm start
  2. open http://localhost:3000 in your favorite browser.
  3. edit any file in ./src (i.e .elm source files or sass/css files) and take it from there

Production workflow

  1. npm run build to build assets for production, this will:
  • compile elm
  • compile sass, extract css applying prefixer on postprocessing
  • copy all the related bundles and files into a /dist directory.
  1. npm run prod to serve them
  2. open http://localhost:3000 in your favorite browser.

Production dist directory structure:

dist/
  |index.html
  |static/
    |css/
      |hash.css
    |js/
      |main-hash.min.js
    ..

Tests

Elm-test boilerplate included. To run the tests, simply run npm test

APIs

Routes are organized following the express route separation example Allowing for a quick prototypation of API endpoints together with the elm client.

A dummy http://localhost:3000/color endpoint is provided as reference. The endpoint return a random Elm color in the exadecimal format when hit with a get request.

Elm-format, Standards JS and Precommit hook

Elm-format will take care of everything related to elm. For anything javascript related we'll rely on standardJS. On npm test standard will check every .js file inside the /server and /src directories making sure they all comply to the standard javascript style.


Elm by default

The project runs with Elm by default and hot replacement of changes to the modules. Currently it is on 0.17.1 A dummy Elm app, that consume the server API is provided as an example.