This repository contains code to demonstrate how type safe API can be created using Go with client library for ELM without writing any decoding/network code.
This is the code I demonstrated on the London Elm Meetup lightning talk called "Typesafe all the way". Talk slides are available here
- Clone the code
git clone https://github.com/kenota/grpc-elm.git - Run
dep ensure - Run
./build.shthis will generate 3 things:- Golang server/client stubs in
proto/gen/golang - Openapi V2 definitions in
proto/gen/swagger - ELM client library & decoders in
proto/gen/elm
- Golang server/client stubs in
- In terminal run
go run main.go - Open another terminal, go to
frontendfolder and runelm reactor - Open http://localhost:8000