examples/poem/mongodb/README.md
Basic integration MongoDB in poem
GET /userQuery users from MongoDB.
[
{
"_id": {
"$oid": "614f73c715681cf389fa93f9"
},
"name": "JungWoo",
"email": "[email protected]",
"age": 19
},
{
"_id": {
"$oid": "614f75e67ade426aa3f73b1c"
},
"name": "Jack",
"email": "[email protected]",
"age": 19
}
]
POST /userInserts a new user into the MongoDB.
Provide a JSON payload with a name. Eg:
{
"name": "JungWoo",
"email": "[email protected]",
"age": 19
}
On success, a response like the following is returned:
{
"_id": {
"$oid": "614f73c715681cf389fa93f9"
},
"name": "JungWoo",
"email": "[email protected]",
"age": 19
}