×

Html & Html5

The World's best Software Development Study Portal




Node Js Path Connection:



create a folder name as public
inside public create a file name it index.html
< html >
< head >
< title >Welcome to ITC< /title>
< /head>
< body>
< p>Welcome to ITC Website< /p>
< /body>
< /html>



connect the path to app.js
const static_path=path.join(__dirname,"../public")
app.use(express.static(static_path))
console.log(path.join(__dirname,"../public"))