Tag: mongodb

  • Creating REST APIs using Node, Express, Typescript, Mongodb

    In the last tutorial, we were able to setup our client using React. In this part, we gonna be focusing on the backend/server building the API’s for our Todo App. Setting up Mongodb Let’s install lerna add ‘mongoose’ –scope ‘@fullstackopenjs/server’ lerna add -D ‘@types/mongoose’ –scope ‘@fullstackopenjs/server’ This will install the dependencies In order to use […]

  • Using $pull in Mongodb aggregation pipelines

    Removing a value from existing array using $pull Suppose we have the following documents in the users collection: Now, if I want to delete swimming from the document where the user_name is “sujaykundu” we can do is : Now, the result will be: ### Remove Items from an Array of embedded documents Now suppose we […]