0% found this document useful (0 votes)
27 views3 pages

Abhishek 9

The document summarizes a Node.js practical experiment on file handling operations. The aim was to write file handling operations in Node.js. The task performed was to write code connecting to a MongoDB database named "Akash" and collecting data from a collection called "kumar". The result was successfully connecting to the database and outputting the response. The learning outcomes were how to use and write Node.js programs, and how to read external text files using Node.js commands.

Uploaded by

Akash Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Abhishek 9

The document summarizes a Node.js practical experiment on file handling operations. The aim was to write file handling operations in Node.js. The task performed was to write code connecting to a MongoDB database named "Akash" and collecting data from a collection called "kumar". The result was successfully connecting to the database and outputting the response. The learning outcomes were how to use and write Node.js programs, and how to read external text files using Node.js commands.

Uploaded by

Akash Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

ADVANCED INTERNET PROGRAMMING

Subject Code:22CAP653

NAME: Abhishek

UID: 22MCC20094 Section/Group:22MCD-2A


Semester: 2ND Date of Performance:11/05/2023
Experiment No. 9

Aim/Overview of the practical: Write the file handling operations in Node JS.

Task to be done:

Code for experiment/practical:


const{MongoClient}=require('mongodb') const
url='mongodb://127.0.0.1:27017'; const client=new
MongoClient(url); const dbname= 'Akash'; async
function getdata() { let result=await
client.connect();
console.log('connected sucessfully');
let db=result.db(dbname); let
collection=db.collection('kumar') let
response=await collection.find({}).toArray();
console.log(response)
}
getdata();

Result/Output/Writing Summary:
Learning outcomes (What I have learnt):
1. Learned how to use and write program of Node.js

2. Learned how to read a external txt file using Node.js command.


Evaluation Grid:
Sr. No. Parameters Marks Obtained Maximum Marks
1. Demonstration and Performance 5
2. Worksheet 10
3. Lab Quiz 5

You might also like