Kupra is a simple REST Server for MongoDB. It could help you building quickly a simple webapp without taking care of a the server side. You just have to set the KUPRA_MONGOD_URI on your system then deploy Kupra war in your tomcat or Jetty.
With Kupra you can perform basic CRUD operation but also bulk insert or update, aggregation, count and sort.
Open your browser at https://127.0.0.1:8080/kupra/documentation and enjoy !
$http(
{
method : 'GET',
url :
'https://127.0.0.1:8668/kupra/rest/myDB/myCollection?
query={"name" : "Sylvain CHAVANEL"}'}
}
).success(function(data, status, headers, config) {
$scope.myList = data;
});
$.post(
'https://127.0.0.1:8668/kupra/rest/myDB/myCollection',
{"_id" : 1, "name" : "Sylvain CHAVANEL"},
function( data ) {
console.log( data.ok );
}, "json");
- Getting started
- GET - List, search, aggregate, count, colStats
- GET by id - Consult one document
- POST - Add document
- PUT - Partial or multi-document update
- PUT by id - Document replacement
- DELETE - Delete with a filter
- DELETE by id - Delete one document
To build kupra, clone this repo then gradle war
Please open an issue if you find a bug or if you want to suggest an improvement. Contribution are also really welcome.
Kupra is released under the MIT Licence. It is open source and free of charge.