diff --git a/index.js b/index.js new file mode 100644 index 0000000..5041c0e --- /dev/null +++ b/index.js @@ -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}` ) + } +}); diff --git a/public/about.html b/public/about.html new file mode 100644 index 0000000..4079fde --- /dev/null +++ b/public/about.html @@ -0,0 +1,17 @@ + + + + + + + About Page + + +

About Page

+ + + \ No newline at end of file diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..b15960b --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ + + + + + + + Index page + + +

Index page

+ + + \ No newline at end of file