Posts

Showing posts from 2021

MongoDB shell version v4.4.4 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: No connection could be made because the target machine actively refused it. : connect@src/mongo/shell/mongo.js:374:17 @(connect):2:6 exception: connect failed exiting with code 1

 Solution for windows :  The solution that worked for me is: Opened the  Task Manager  ( ctrl + shift + esc ) ->  Services  tab and  there was a MongoDB row  with the  status stopped . Then I  right-clicked and clicked start  and everything worked perfectly  😀 https://stackoverflow.com/a/53635485/6393408

First Backend Website

Image
 Today I built a website that shows the current temperature of any location using Express Node.js. This is the first complete website that I understood mostly each and every portion of the code except some of the CSS code. Took many hours to write this code and of course, took breaks in between writing codes. And the website looks like as shown in the figure below:

Promises in JavaScript

Image
 Code :  // resolve // reject // pending console . log ( "We are at tutorial 39b" ); // Pretend that this response is coming from the server const   students =[     { name : "Ram" ,  subject : "JavaScript" },     { name : "Rohan" ,  subject : "Machine Learning" } ] function   enrollStudent ( student ){      return   new   Promise ( function ( resolve ,  reject ){          setTimeout ( function (){              students . push ( student );              console . log ( "Student has been enrolled" );              const   error = false ;       ...

History for the Indian Cricket Team

 Today, January 19, 2021, has been written into the history of the Indian Cricket Team as they beat Australian Cricket Team by 3 wickets. With the team struggling with injuries, the team gave a debut to likes of Washington Sundar, who batted and bowled confidentially throughout the match. Shubman Gill produced limelight throughout the whole series. He batted beautifully and confidentially. Actually, the team received set back when the whole team was bowled out only for 36 runs in the second innings of the first test match which eventually they lost. Surely, then the players played as a team when it mattered the most. Ajinkya Rahane batted beautifully and made good decisions. Mohammad Siraj was magnificent throughout the series. He must have made his father proud who passed a few days back. Chetwesar Pujara, Shardul Thakur and Ravindra Jadeja when mattered the most. Chetwesar Pujara obviously frustrated Aussie bowlers throughout the series. Rishab Pant who was trolled for many reaso...