This is the new WhatGrowsHere Backend, rewritten in Go, using MongoDB.
- 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)
- Download the data files
You will need to have the gdrive CLI tool installed and in your PATH
cd data
bash download.sh
- 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
- Test the webserver
cd api
govendor sync
go build index.go
./index
./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).
TODO
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.