-
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
e5e9ac2
commit 0546f33
Showing
3 changed files
with
50 additions
and
0 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,16 @@ | ||
const express =require('express'); | ||
const path = require('path'); | ||
const port =5000; | ||
|
||
const app = express(); | ||
const publicPath = path.join(__dirname , 'public'); | ||
console.log(publicPath); | ||
|
||
//linking all the files of public folder to be render on browser | ||
app.use(express.static(publicPath)); | ||
|
||
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>About Page</title> | ||
</head> | ||
<body> | ||
<h1>About Page</h1> | ||
<style> | ||
h1{ | ||
color: blue; | ||
} | ||
</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,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>Index page</title> | ||
</head> | ||
<body> | ||
<h1>Index page</h1> | ||
<style> | ||
h1{ | ||
color: red; | ||
} | ||
</style> | ||
</body> | ||
</html> |