Covid19

command module
v0.0.0-...-c222b49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

Screenshot 2021-03-22 at 4 47 28 PM

Covid19

Get COVID-19 cases information in Indian Geography

Hosted app on Heroku

https://sleepy-wave-66147.herokuapp.com/swagger/index.html

Follow the instructions below to get a local app running

Install golang

with homebrew:

sudo brew install go

with apt-get:

sudo apt-get install golang

Project Setup

Clone the repository

git clone https://github.com/shikhar1996/Covid19.git

Enter the directory

cd Covid19

With Go Modules support easily clone repo outside GOPATH

go install

Update the database location and credentials in the following files

  • src/database/connect.go
  • src/database/redis.go
  • src/geoencoding/reverse_encoding.go

Generate Swagger docs

swag init -g src/server/server.go

Start server

go run main.go

Access the API and Swagger UI through the connection on the connected port.

http://localhost:{port}/
http://localhost:{port}/swagger/index.html

Limitations

  • There is monthly limit of 25,000 requests for reverse encoding API.
  • Redis Cache 30MB
  • Heroku 550 free dyno hours each month. The server will sleep after 30 minutes of inactivity. In this case the first request might be slow

Postman Collection

Issues

  • If the server is running on secured domain use HTTPS for sending request.
  • If the server is running on localhost HTTP can be used.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL