/codematic-test

A simple but extensible API that returns the time of 6 different African time zone.

Primary LanguageTypeScript

codematic-test

This is a simple API that returns the time of 6 different timezones in Africa

Local development set up

  • git clone git@github.com:Bashorun97/codematic-test.git
  • cd codematic-test
  • docker-compose -f docker/main/docker-compose.yaml -f docker/main/docker-compose.dev.yaml build api to build the api service
  • You can then do docker-compose -f docker/main/docker-compose.yaml -f docker/main/docker-compose.dev.yaml up api to bring up the services.
    The API is also available on a Kubernetes cluster and can be accessed via http://35.196.61.148/codematic/?timezone=<timezone>

The API is very extensible as it uses the strategy design pattern and polymorhism to abstract the calls to timezones.

The API only returns the time CVT, GMT, CAT, WAT, EAT, MT. Otherwise a 404 error is thrown.

sucesss

"16:59:0"

error

message	"Timezone doesn't exist"