This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get all | |
db.restaurants.find(); | |
// Limit and sort | |
db.restaurants.find().sort({name: 1}).limit(10); | |
// Get by _id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let test = [1, 2, [3], [4, 3], 5] | |
function flattenArr(arr) { | |
let res = []; | |
arr.map((item =>{ | |
let type = typeof(item); | |
if(type !== 'number'){ | |
for(i = 0; i < item.length; i++){ | |
res.push(item[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/Arkangel17/node-shopping-list-v3_DELETE.git | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GitHub Repo Link: | |
https://github.com/Arkangel17/node-shopping-list-v2.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GitHub repo: | |
https://github.com/Arkangel17/node-shopping-list-v1/commits/master | |
URL / Postman Testing: | |
http://localhost:8080/recipes | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://powerful-cliffs-65021.herokuapp.com/cool | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Glitch Code: | |
https://glitch.com/edit/#!/amused-shrine?path=server.js:7:0 | |
use postman with this address: | |
https://amused-shrine.glitch.me/api/users/me | |
and the following header: | |
[{"key":"x-username-and-password","value":"user=joeschmoe@business.com&pass=password","description":""}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://glitch.com/edit/#!/standing-reminder?path=server.js:4:0 | |
request: { must copy and paste this to url after clicking 'show live' } | |
/echo/pets?cat=meow&dog=woof | |
study resources: | |
https://expressjs.com/en/guide/routing.html#route-parameters |