Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/feliixx/mongoplayground

a simple sandbox to test and share MongoDB queries
https://github.com/feliixx/mongoplayground

fiddle mgodatagen mongodb playground

Last synced: 8 days ago
JSON representation

a simple sandbox to test and share MongoDB queries

Awesome Lists containing this project

README

        

[![Go Report Card](https://goreportcard.com/badge/github.com/feliixx/mongoplayground)](https://goreportcard.com/report/github.com/feliixx/mongoplayground)
[![codecov](https://codecov.io/gh/feliixx/mongoplayground/branch/master/graph/badge.svg)](https://codecov.io/gh/feliixx/mongoplayground)

# Mongo Playground

Mongo playground: a simple sandbox to test and share MongoDB queries. Try it online : [**https://mongoplayground.net**](https://mongoplayground.net/)

## Shared playgrounds

Shared playgrounds are saved forever. Do not share playground containing sensitive data, as
they can get accessed by anyone who get the playground link!

## Limitations

### Size limitations

This playground has several limitations:

- a database can't contain more than **10 collections**
- a collection can't contain more than **100 documents**

### Queries

Currently, the playground can run only `find()`, `aggregate()` and `update()` queries

### shell regex

Currently, shell regex doesn't work in query.

so instead of

```JSON5
db.collection.find({
"k": /pattern/
})
```

use

```JSON5
db.collection.find({
"k": {
"$regex": "pattern"
}
})
```

## Developpement

To automatically restart the server when a file changes, use:

```sh
ls *.go internal/*.go internal/web/src/* | entr tools/restart.sh
```

## Credits

This playground is heavily inspired from [The Go Playground](https://play.golang.org)

Editors are created with [ace](https://ace.c9.io/), and the documentation is styled using [github-markdown-css](https://github.com/sindresorhus/github-markdown-css)

Favicon was created on [favicon.io](https://favicon.io/) from an emoji provided by [twemoji](https://github.com/twitter/twemoji)

Queries are executed in an atlas cluster graciously provided by MongoDB