I'm using nodejs, mongoose.
No controllers at the end I give res.json(clientes);
and in my route I create:
app.get('/clientesjson/:id', isLoggedIn, cliente.clientesjson);
I need to access my Json information by ID. In the current way, any information I type in the ID location will open my Json file If I type:
http://localhost:3000/clientesjson/qualquercoisa
Open the Json file.
I want to know how to set an id and just open it.
http://localhost:3000/clientesjson/43546575867gg556TT7