Professional Documents
Culture Documents
Mern (Adv) Exp 14: Name: K.Harshavardhan SEC: 33-B ID: 2200031420
Mern (Adv) Exp 14: Name: K.Harshavardhan SEC: 33-B ID: 2200031420
NAME : K.HARSHAVARDHAN
SEC : 33-B
ID : 2200031420
Exercise 1: Create a Node.js server. Create a .txt file within public folder. Access the file for reading
data from it and writing data into the file. Append some new texts in the file after that delete the file.
Exercise 2: Create a Node.js server and connect your database. Using mongoose create an image
model (schema) that contains information about your image file. Configure the storage using multer
for the image file. Create upload middleware instance using multer to handle file upload requests.
Attach the middleware to the post route(s) or endpoint(s) in your Node.js application.
Procedure/Program:
OUTPUT:
Post-Lab:
Question 1: Display the contents of other file types(pdf) to the browser by GET route of the server.
Procedure/Program:
OUTPUT: