Skip to content

frsfahd/go-weather

Repository files navigation

go-weather

Restful weather API based on virtual crossing service. This project adds cache layer to the based API.

Additionally, there is also performance testing with k6 (see load_test.js and smoke_test.js). For rate limiting, it uses token bucket from golang.org/x/time/rate (see middlewares.go)

Getting Started

Live demo : https://go-weather.fly.biz.id/docs

  1. clone this repo
  2. spin up redis instance make docker-run
  3. create .env file (see env-sample)
  4. run the API make run

MakeFile

Run build make command with tests

make all

Build the application

make build

Run the application

make run

Create DB container

make docker-run

Shutdown DB Container

make docker-down

Live reload the application:

make watch

Run the smoke test:

make smoke_test

Run the load test:

make load_test

Clean up binary from the last build:

make clean

About

an API wrapper for Virtual Crossing API (weather API)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors