Skip to content

hkolasani/gomongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gomongo

A Simple REST API for mongoDB in GO!

Enables the mongoDB CRUD operations on any collection using simple HTTP REST calls.

This is my first serious attempt at GO programming language and mongoDB. The code works but I am sure there is a lot of room for re-factoring and clean up.

To use it in a real web app environment, the code needs to be beefed up with some authentication code around the services.

This project consists of the following three files. It has a dependency on labix.org/v2/mgo

  • mongoweb.go : Main program (HTTP Server)- handles GET,POST,PUT and DELETE
  • db.go : Provides wrapper methods to mGO(a native mongoDB driver in GO) CRUD fucntions
  • testdb.go : Test functions for db.go

USAGE:

Note:
/gomongo/services is the URL that the service listens to 'people' is the name of the mongodb collections in the above examples

About

A Simple REST API for mongoDB in GO!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages