-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0546f33
commit fa0a057
Showing
7 changed files
with
15,947 additions
and
722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Not a valid page</title> | ||
</head> | ||
<body> | ||
<h1>Oops , This is not a valid page</h1> | ||
|
||
<style> | ||
h1{ | ||
color:red; | ||
} | ||
</style> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const express = require('express'); | ||
const path = require('path'); | ||
|
||
const port = 8000; | ||
const app = express(); | ||
const publicPath = path.join(__dirname , 'public'); | ||
|
||
app.get('/index' , (req , res)=>{ | ||
res.sendFile(`${publicPath}/index.html`); | ||
}); | ||
|
||
app.get('/about' , (_ , res) => { | ||
res.sendFile(`${publicPath}/about.html`); | ||
}); | ||
|
||
app.get('' , (_ , res) => { | ||
res.sendFile(path.join(`${__dirname}/home.html`)); | ||
}); | ||
|
||
//rendering the 404 page | ||
app.get('*' , (_ ,res) =>{ | ||
res.sendFile(path.join( `${__dirname }/404.html` )) | ||
}); | ||
|
||
app.listen(port , (err) => { | ||
if(!err){ | ||
console.log(`Server is running on the port:: ${port} `); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Home Page</title> | ||
</head> | ||
<body> | ||
<h1>Home Page</h1> | ||
<style> | ||
h1{ | ||
color: yellowgreen; | ||
} | ||
</style> | ||
</body> | ||
</html> |
Oops, something went wrong.