/** ----------------------- MongoDB Connection ------------------------

  1. Create account

  2. Create an user with password

  3. Whitelist IP address

  4. database > connect > driver > Node > show all code

  5. Change the password in the uri

         --------------------
          Server side steps
         ---------------------
    
  6. Create --- post

  7. app.post('/users'/ async (req, res) =>{})

  8. Make the function async to use await inside it

  9. Make sure you use the express.json() middleware

  10. access data from the body: const user = req.body

  11. const result = wait userCollection.insertOne(user);

  12. res.send(result)

        -----------------
        Client Side
        -----------------
    
    1. create fetch
    1. add second parameter as an object
    1. provide method: 'POST'
    1. add headers :{'content-type':'application/json'}
    1. add body: JSON.Stringify(user)

         -------------
           Read MANY
         -------------
      
  1. Create a cursor = userCollection.find()

  2. const result = await cursor.toArray()

         ----------
           DELETE
         ----------
    
  3. create app.delete('/users/:id', async(req, res)=>{})

  4. specify unique ObjectId to delete the right user

  5. const query = {_id: new ObjectId(id)}

  6. const result = await userCollection.deleteOne(query);

         ------------
            Client
         ------------
    
  7. Create dynamic url with id

  8. make sure to mention the DELETE method

****/