I am not able to use __dirname it is taking as avariable not a function

const express = require(‘express’)
const port_no = 8888;
const app = express();

app.get(’/’, (req,res)=>{
//console.log(req);
console.log(__dirname);
res.send(‘Hello World!’)
})
// for sending data in request we use either ‘params’ or ‘query’
app.get(’/greet/:name’, (req,res)=>{
console.log(req);
res.send(Hello!! ${req.params.name});
})

app.get(’/greet’, (req,res)=>{
console.log(req);
res.send(Hello!! Good ${req.query.x} ${req.query.name});
})

app.get(’/file’, (req,res)=>{
res.sendFile(path.join(__dirname + ‘\index.html’)); // path.join accepts two parameters and creates a path of the two
})

app.get(’/server.js’, (req,res)=>{
alert(‘You virtually received the file’);
})

app.listen(port_no, (err)=>{
console.log(Server started at http://localhost:${port_no}); // does not highlight the number though
//console.log(‘Server started at:’, port_no);
})