Skip to content
Snippets Groups Projects
Commit d28d6345 authored by Joel Cavat's avatar Joel Cavat
Browse files

Update Readme

parent 72d4586d
Branches
No related tags found
No related merge requests found
build and run MongoDB and Node.js API with `orders.json` dump:
(run `mongo-seed` first !!)
```
docker-compose up --build -d
```
if you encounter any problem (no order db), run `mongo-seed` first :
```
docker-compose up --build -d mongo-seed
docker-compose up -d
```
use mongodb (mongo shell):
```
......
......@@ -21,8 +21,9 @@ exports.byCustomerPseudo = (req, res) => {
db.collection('orders').find({ 'customer.pseudo': { $eq: req.params.pseudo } }).toArray((err, docs) => {
if (err) {
console.log(err);
res.send(err);
}
console.log(docs);
res.send(docs);
res.json(docs);
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment