Local Dev with Moov

Running all of Moov's services locally lets you write code against our services faster and let's us fix bugs faster.

Before starting please make sure you have Go setup and can build our projects from source.

Once you're setup, run each service locally. This requires 3 terminals / shells:

# ACH
$ go run ./cmd/server/
ts=2018-12-13T19:18:10.340963Z caller=main.go:69 startup="Starting ach server version v0.6.0-rc2"
ts=2018-12-13T19:18:10.341843Z caller=main.go:122 transport=HTTP addr=:8080
ts=2018-12-13T19:18:10.34192Z caller=main.go:112 admin="listening on :9090"

# Auth
$ go run .
ts=2018-12-13T19:18:11.062095Z caller=main.go:80 startup="Starting auth server version v0.4.3-dev"
ts=2018-12-13T19:18:11.062633Z caller=main.go:103 main="sqlite version 3.25.2"
ts=2018-12-13T19:18:11.062617Z caller=main.go:92 admin="listening on :9091"
ts=2018-12-13T19:18:11.064059Z caller=sqlite.go:96 sqlite="starting database migrations..."
ts=2018-12-13T19:18:11.064153Z caller=sqlite.go:105 sqlite="migration #0 [create table if not exists users(user_id...] changed 0 rows"
... (more database migration log lines)
ts=2018-12-13T19:18:11.064345Z caller=sqlite.go:108 sqlite="finished migrations"
ts=2018-12-13T19:18:11.066804Z caller=main.go:189 transport=HTTP addr=:8081

# Paygate
$ go run .
ts=2018-12-13T19:18:11.970293Z caller=main.go:55 startup="Starting paygate server version v0.1.0-rc3"
ts=2018-12-13T19:18:11.970391Z caller=main.go:59 main="sqlite version 3.25.2"
ts=2018-12-13T19:18:11.971777Z caller=database.go:88 sqlite="starting database migrations"
ts=2018-12-13T19:18:11.971886Z caller=database.go:97 sqlite="migration #0 [create table if not exists customers(cus...] changed 0 rows"
... (more database migration log lines)
ts=2018-12-13T19:18:11.97221Z caller=database.go:100 sqlite="finished migrations"
ts=2018-12-13T19:18:11.974316Z caller=main.go:96 ach="Pong successful to ACH service"
ts=2018-12-13T19:18:11.975093Z caller=main.go:155 transport=HTTP addr=:8082
ts=2018-12-13T19:18:11.975177Z caller=main.go:124 admin="listening on :9092"

OPTIONAL:

Once all services are running you can use our apitest tool to ensure everything is working as intended.

# Disable Go Modules to install at $GOPATH/bin/apitest
$ GO111MODULE=off go get -u github.com/moov-io/api/cmd/apitest

# Run apitest and hit local services
$ apitest -local
2018/12/13 19:21:54.118542 main.go:46: Starting apitest v0.4.3-dev
2018/12/13 19:21:54.118573 main.go:61: Using http://localhost as base API address
2018/12/13 19:21:54.118585 main.go:83: Using X-Request-ID: 98d9d606167f03e6493c1dd09c22f085d8af2ea5
2018/12/13 19:21:54.121004 main.go:190: ACH PONG
2018/12/13 19:21:54.122041 main.go:200: auth PONG
2018/12/13 19:21:54.123022 main.go:210: paygate PONG
2018/12/13 19:21:54.253023 main.go:97: SUCCESS: Created user c2137a0a4b0e437b83c3786827ae8ef1be8f7bc7 (email: [email protected])
2018/12/13 19:21:54.254055 main.go:106: SUCCESS: Cookie works for user c2137a0a4b0e437b83c3786827ae8ef1be8f7bc7
2018/12/13 19:21:54.256138 main.go:112: SUCCESS: Created OAuth access token, expires in 2h0m0s
2018/12/13 19:21:54.262281 main.go:127: SUCCESS: Created Originator Depository (id=7d9132b2f5d1e0f325540e48886817319a801c92) for user
2018/12/13 19:21:54.264103 main.go:134: SUCCESS: Created Originator (id=e4f63ed5efba7386c654cb14dd23ae53aa705cec) for user
2018/12/13 19:21:54.269265 main.go:142: SUCCESS: Created Customer Depository (id=2ee898f9663a3683860449abd36007d6fa241c2c) for user
2018/12/13 19:21:54.271595 main.go:149: SUCCESS: Created Customer (id=f01861ddaa466f33dfcde1600472dcefad8f1739) for user
2018/12/13 19:21:54.284106 main.go:156: SUCCESS: Created USD 216.76 transfer (id=54fa8e9e045f3a0e70de4ae28e47d1712eac413d) for user
2018/12/13 19:21:54.284716 main.go:162: SUCCESS: invalid login credentials were rejected

Great! If you want to hit multiple services outisde of apitest use our local.Transport to route requests to each local app.