Skip to content

growingdatafoundation/wgh-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatGrowsHere Backend

This is the new WhatGrowsHere Backend, rewritten in Go, using MongoDB.

Table of Contents

Prerequisites

  • Go version > 1.7
  • Go environment set up
  • govendor installed
  • MongoDB version > 3.4.4 (however, keep in mind that ^3.4 will be deprecated soon - 3.6.0 offers new improvements which we will harness soon)

Installation

  1. Download the data files

You will need to have the gdrive CLI tool installed and in your PATH

cd data
bash download.sh
  1. Import the data files into Mongo.

This step could be better parallelized, as it can take quite a while (~8h on a mid-range laptop), however since you should only run this once, it is not a priority.

cd import
govendor sync
go build import.go
./import
  1. Test the webserver
cd api
govendor sync
go build index.go
./index

Usage

./index is the main API server, powered by Gin.

Set the PORT env-var to change the port it listens on.

A good idea is to have nginx in front for reverse-proxying (this also enables multiple instances in case of a huge workload).

API documentation

TODO

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

About

What grows Here - backend API and caching layer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published