This is an example of a basic API server that retrieves resources based on the URL pattern. It relies on a MongoDB instance and standard REST conventions.
Getting Started
Seed your MongoDB with some data. In your mongo client, run the following:
use test
db.notes.insert({"note": "This is a note."});
Start up the application server
Install Godep with go get -u github.com/tools/godeps.
Build the application with make build.
Run the application within Docker or standalone.
Run modes
With Docker
Run make start
Access the server at http://$DOCKER_IP:9000/
Standalone
Run ./golang-rest-server will start the server at http://localhost:9000/ and look for a mongo DB at localhost.
Use command line arguments to override: ./golang-rest-server --help