diff --git a/index.js b/index.js index 52033b7..e0e48b4 100644 --- a/index.js +++ b/index.js @@ -30,6 +30,25 @@ Postgres.FirstRow = function (inSQL, args, inResponse) { }); }; +server.get('/', (req, res) => res.send('node.js express is up and running')) + + +server.get('/test_sql', function(req, res){ + var path = './route_meta/scenario_totals.sql' + var callback = function(arg){ + res.send(arg) + }; + + fs.readFile(path, 'utf8', function(err, data){ + if (!err){ + callback(data); + } else { + callback(err); + } + }); + +}); + server.get('/scenario_package', bodyParser.json(), function (req, res) { var w = ""; @@ -281,23 +300,4 @@ server.get('/get_pool', bodyParser.json(), function (req, res) { //res.json("hi") }) -server.get('/', (req, res) => res.send('node.js express is up and running')) - - -server.get('/test_sql', function(req, res){ - var path = './route_meta/scenario_totals.sql' - var callback = function(arg){ - res.send(arg) - }; - - fs.readFile(path, 'utf8', function(err, data){ - if (!err){ - callback(data); - } else { - callback(err); - } - }); - -}); - server.listen(3000, () => console.log('started'))