rearrange routes

This commit is contained in:
Trowbridge 2019-03-05 23:57:31 -05:00
parent 0643c60d2b
commit 487e71c1e7

View File

@ -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) { server.get('/scenario_package', bodyParser.json(), function (req, res) {
var w = ""; var w = "";
@ -281,23 +300,4 @@ server.get('/get_pool', bodyParser.json(), function (req, res) {
//res.json("hi") //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')) server.listen(3000, () => console.log('started'))