that is what I also thought that is has to be a file but look at the label carefully
GeoJSON URL. URL so this is what we did. might be a bit overkill but works perfectly for us
app.get('/postgis', (req, res) => {
db.one('SELECT geo FROM public.stores', 123)
.then((data) => {
//return res.json(data.geo)
return res.status(200).send(data.geo)
})
.catch((error) => {
console.log('ERROR:', error)
})
})
I think it might be best to review your architectural approach to this whole thing. You have data scattered in a few places. They need to be centralized. you already have postgres so I would highly recommend you have it centralized there.