Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Last active December 3, 2018 04:18
Show Gist options
  • Save harrisonmalone/f98c0531b4d2fbe0436a180ca878f22f to your computer and use it in GitHub Desktop.
Save harrisonmalone/f98c0531b4d2fbe0436a180ca878f22f to your computer and use it in GitHub Desktop.
could be useful for future reference in going deep into mongodb
get '/todolist'
db.tasks.find({})
get '/todolist/:id'
db.tasks.find({_id: id})
get '/search'
db.tasks.find({name: name})
post '/todolist'
db.tasks.insert({object})
put '/todolist/:id'
db.tasks.update({object _id}, {$set{attributes}})
delete 'todolist/:id'
db.tasks.remove({object _id})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment