```js
    const Express=require('express');
    const fs=require('fs');
    const app =new Express();
    // app.get("/",(req,res)=>{
    //     res.send("Hello I am at Home");
    // })
    // app.post("/",(req,res)=>{
    //     res.send("hello i am at end point");
    // })
    const tours=JSON.parse(
        fs.readFileSync(`${__dirname}/data.json`,'utf-8')
    )
    app.get('/api',(res,req)=>{
        res.json({
            status:"success",
            data:{
                tours:tours
            }

        })
        console.log("server running")
    })
    app.listen(8000);

```

**Showing `res.json` is not a function.**

Why it is showing this error? I saw a tutorial in which the code run successfully, but I am getting error?