in my web example.com it opens index.html this is an intreactive page so there is a lot of JavaScript.
how can i make it so that when the url entrerd is example.com/open?(some query) the server proceses that query and send some data in json but the client to open index.html
i want something similar to
app.get(/open,(req,res)=>{
let query=res.query
//proces the query into some data with the database
let data={message:"hello world"}
res.json(data).sendfile(index.html)
})
the client should open index.html but also have some data to proces and display later