updates from darla

This commit is contained in:
Timothy Preble 2020-12-09 16:59:37 -05:00
parent e0f234cfe8
commit 3058ec0d2e
2 changed files with 8 additions and 3 deletions

4
run.txt Normal file
View File

@ -0,0 +1,4 @@
sudo docker build -t timpreble/tsapi3:1.0.0 .
sudo docker run -d -p 3001:3001 --name tsapi3.1 --restart=always timpreble/tsapi3:1.0.0

View File

@ -36,11 +36,12 @@ server.get('/api/today', function (req, res) {
});
});
server.get('/api/campaign',function(){
server.get('/api/campaign',function(req, res){
connection.query('CALL CP_RPT_TweetsByScreenName ();',function(error, results, fields){
if(error) throw error;
//https://www.sitepoint.com/using-node-mysql-javascript-client/
res.end(results);
//https://www.sitepoint.com/using-node-mysql-javascript-client/
res.end(JSON.stringify(results));
//res.end(results);
});
});