This creates a basic Go server that returns some stubbed data when making a request to /api/v1/events.
Resolves: #4
Thought Process
I tried to use a domain-driven-design pattern for this first pass, which just returns stubbed data, but could just as easily be swapped out to work with any datastore.
The server is hardcoded to listen on :8080 for now. When we introduce more configuration, we'll make this value configurable as well.
Testing Steps
You can test that this builds and runs:
go run ./cmd/eventual
Then navigate to http://localhost:8080/api/v1/events or curl http://localhost:8080/api/v1/events and you should get back a json formatted array of event objects.
When I started to write some unit tests, I found that I was mostly just testing the mock implementation rather than the actual code itself, which doesn't have any business logic, yet.
Risks
Low risk, this is a stubbed implementation of the server, nothing ready to make live yet.
Overview
This creates a basic Go server that returns some stubbed data when making a request to
/api/v1/events
.Resolves: #4
Thought Process
I tried to use a domain-driven-design pattern for this first pass, which just returns stubbed data, but could just as easily be swapped out to work with any datastore.
The server is hardcoded to listen on
:8080
for now. When we introduce more configuration, we'll make this value configurable as well.Testing Steps
You can test that this builds and runs:
go run ./cmd/eventual
curl http://localhost:8080/api/v1/events
and you should get back a json formatted array of event objects.When I started to write some unit tests, I found that I was mostly just testing the mock implementation rather than the actual code itself, which doesn't have any business logic, yet.
Risks
Low risk, this is a stubbed implementation of the server, nothing ready to make live yet.