Skip to content

๐Ÿ—„๏ธ An Open Microservice to connect to a MongoDB instance.

License

Notifications You must be signed in to change notification settings

omsable/mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MongoDB Open Microservice

This is a mongodb service

Open Microservice Specification Version Open Microservices Spectrum Chat Open Microservices Code of Conduct Open Microservices Commitzen PRs Welcome

Introduction

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.

Getting Started

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!

Installation

npm install -g @microservices/oms

Usage

Open Microservices CLI Usage

Once you have the oms-cli installed, you can run any of the following commands from within this project's root directory:

Actions

find
Action Arguments
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
findOne
Action Arguments
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
insert
Action Arguments
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

Contributing

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.

Edit mongodb on CodeSandbox

This project is guided by Contributor Covenant. Please read out full Contribution Guidelines.

Additional Resources

About

๐Ÿ—„๏ธ An Open Microservice to connect to a MongoDB instance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published