andrewMacmurray / order-taking-service

An Elm implementation of the example from "Domain Modelling made Functional"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Order Taking Service

An 'Order Taking Service' adapted from an F# example in Domain Modeling Made Functional into Elm

What is it?

  • A TypeScript Apollo Graphql Server
  • An embedded Elm worker program (the Domain Brain!)

The server implements a single Mutation: placeOrder which runs a number of validations on the input, calls some fake services and returns either the recorded PlaceOrderEvents or Errors that occur.

How to run it

install dependencies

> npm install

bundle the server

> npm run build

start the server with

> npm run serve

Visit the graphiql playground at http://localhost:4000 to try out the service.

Screen Shot 2019-09-01 at 23 37 01

About

An Elm implementation of the example from "Domain Modelling made Functional"

License:MIT License


Languages

Language:Elm 78.7%Language:TypeScript 21.3%