This is a mongodb service
This project is an example implementation of the Open Microservice Specification, a standard originally created at Storyscript for building highly-portable "microservices" that expose the events, actions, and APIs inside containerized software.
The oms
command-line interface allows you to interact with Open Microservices. If you're interested in creating an Open Microservice the CLI also helps validate, test, and debug your oms.yml
implementation!
See the oms-cli project to learn more!
npm install -g @microservices/oms
Once you have the oms-cli installed, you can run any of the following commands from within this project's root directory:
Argument Name | Type | Required | Default | Description |
---|---|---|---|---|
db | string |
true |
None | No description provided. |
coll | string |
true |
None | No description provided. |
query | map |
true |
None | No description provided. |
sort | map |
false |
None | No description provided. |
fields | map |
false |
None | No description provided. |
MONGODB_URI | string |
false |
None | The MongoDB URI to be used in the connection. Defaults to mongodb://localhost:27017/. |
oms run find \
-a db='*****' \
-a coll='*****' \
-a query='*****' \
-a sort='*****' \
-a fields='*****' \
-e MONGODB_URI=$MONGODB_URI
Argument Name | Type | Required | Default | Description |
---|---|---|---|---|
db | string |
true |
None | No description provided. |
coll | string |
true |
None | No description provided. |
query | map |
true |
None | No description provided. |
sort | map |
false |
None | No description provided. |
fields | map |
false |
None | No description provided. |
MONGODB_URI | string |
false |
None | The MongoDB URI to be used in the connection. Defaults to mongodb://localhost:27017/. |
oms run findOne \
-a db='*****' \
-a coll='*****' \
-a query='*****' \
-a sort='*****' \
-a fields='*****' \
-e MONGODB_URI=$MONGODB_URI
Argument Name | Type | Required | Default | Description |
---|---|---|---|---|
db | string |
true |
None | No description provided. |
coll | string |
true |
None | No description provided. |
doc | map |
true |
None | No description provided. |
MONGODB_URI | string |
false |
None | The MongoDB URI to be used in the connection. Defaults to mongodb://localhost:27017/. |
oms run insert \
-a db='*****' \
-a coll='*****' \
-a doc='*****' \
-e MONGODB_URI=$MONGODB_URI
All suggestions in how to improve the specification and this guide are very welcome. Feel free share your thoughts in the Issue tracker, or even better, fork the repository to implement your own ideas and submit a pull request.
This project is guided by Contributor Covenant. Please read out full Contribution Guidelines.
- Install the CLI - The OMS CLI helps developers create, test, validate, and build microservices.
- Example OMS Services - Examples of OMS-compliant services written in a variety of languages.
- Example Language Implementations - Find tooling & language implementations in Node, Python, Scala, Java, Clojure.
- Storyscript Hub - A public registry of OMS services.
- Community Chat - Have ideas? Questions? Join us on Spectrum.