-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
27 lines (20 loc) · 789 Bytes
/
server.js
File metadata and controls
27 lines (20 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// codenmon used here
// to activate the command is: nodemon server.js
// to instal the nodemon : npm install -g nodemon
const express = require("express");
const app = express();
app.get("/" ,function(req, res){
res.send("<h1> Hello World!!.......");
});
app.get("/contact" ,function(req, res){
res.send("<h1> Husain@gmail.com");
});
app.get("/about" ,function(req, res){
res.send("<h1>I am Husain</h1><p> I am a programmer ans I am learning the express for node js. I am currently in a third year of my college medi-caps University.</p><br><p>That's all about me THhank You!!</p>");
});
app.get("/hobbies", function(req ,res){
res.send("<ul><li>coding</li><li>CP....</li></ul>")
});
app.listen(3000,function(){
console.log("server started on port 3000");
});