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.
Seed your MongoDB with some data. In your mongo client, run the following:
use test
db.notes.insert({"note": "This is a note."});
- Clone the repo.
go get -d ./...
or if you have gpm installedgpm
.- Run
go run server.go --databaseName=test --databaseUrl=localhost:27017
- Go to
http://localhost:3000/notes
This is a work in progress.