Hi, I'm trying to use locomotive to connect to a redis database. I would like to know if it's necessary to use express to do so or not. If true, how could I do something similar to this with locomotive:
app.get('/data.json', function(req, res){
res.header("Access-Control-Allow-Origin", "*");
datapoints.updateRT();
valores=[ {"aData": datapoints.data}]
res.contentType('application/json');
res.send(JSON.stringify(valores[0]));
});
I understand the app variable would be either locomotive or express.
Thank you very much in advance and sorry for my ignorance with this tech.