Lab Manual - MCAO20104 Advance Web Development
Lab Manual - MCAO20104 Advance Web Development
603203
LAB MANUAL
Course :MCA
SEMESTER- IV
SUBJECTTITL
E
Advanced Web Development
SUBJECT
CODE
MCAO20104
Prepared By
Dr.S.Umarani
Professor, Department of Computer Science and Applications(BCA)
SRM IST
COURSE OUTCOME
Aim
Develop program to display home, contact and about page
Procedure
Node app.js
Output
Home Screen
Contact Screen
Result
Aim
To implement login page with html
Directorate of Online Education
Procedure
1. Create folder in any place
2. Goto cmd
3. Check the following
Node -v
Npm -v
4. Npm install express
5. Open the folder in vscode
6. Add json file
Npm init -y
7.Create app.js file
Add the following
const express = require("express") ;
const app = express() ;
app.get('/', function(req, res)
{
res.sendFile(__dirname +"/"+"index.html");
}
);
app.listen(3000, () =>
{ console.log("listening on http://localhost:3000"); })
8.Create index.html file
Add the following
<html>
<body>
<form action="localhost:8080/home" method ="GET">
UserName <input type="text" name="username"/>
password <input type="text" name="password"/>
<input type="submit" value="submit"/>
</form>
</body>
</html>
9. Save and run the application
Node app.js
Output
Aim
Procedure
<html>
<body>
<a href ="https://www.youtube.com/">youtube</a>
<a href="https://www.tutorialpoint.com">TutorialPoint</a>
</body>
</html>
9.Create rouring.js
Output
Result
Aim
Procedure
app.listen(4000 , ()=>{
console.log("server is running on port 4000");
})
8.Create index.ejs
<!--Ejs File-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
Directorate of Online Education
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>welcome</h1>
</body>
</html>
Output
welcome
Result
Procedure
Or
app.use(cors());
Directorate of Online Education
app.use(express.json());
app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});
8. Install Postman
https://web.postman.co/workspace/My-Workspace~5a23bb0b-e449-4d79-8b65-805c2feaede0/
request/34988460-42340ceb-2ca5-466a-b7fe-1016629d1e02?tab=body
9. select collection
• press plus symbol
• create connection named as CRUD example
• add method post example
• change method as Post
• type url http://localhost:3000/test/create
get()
{
“title”:”python”,
“rating”:4.8
}
Result
Aim
Procedure
1.Install PUG
npm install pug
npm install pug –save
7. Create app.js
Output
Result
Aim
Procedure
1.Install vscode
2.Install node js
3.Install angular
npm install -g @angular/cli
Output
Directorate of Online Education
Result
APPENDIX - II
LIST OF EXPERIMENTS -ASSIGNMENTS -LMS