Commit 1df7a84a authored by Porter Libby's avatar Porter Libby
Browse files

small refactor

parent 863620ca
const express = require('express');
const q = require('./queries');
var pjson = require('./package.json');
var path = require('path');
var favicon = require('serve-favicon');
const app = express();
var rest = new require('restful-api')(app);
console.log("================================================================================");
console.log("| |");
console.log("|██ ██████ ██████ ██████ █████ ██████ █████ ██ ██ ██ ██████ ██████ |");
......@@ -17,6 +10,13 @@ console.log("|
console.log("====================================================================== v" + pjson.version + " ==");
console.log("\n");
const express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
const app = express();
var rest = new require('restful-api')(app);
const q = require('./server/queries');
app.set('view engine', 'ejs');
app.get('/', function(req, res) {
res.render("index",{
......@@ -53,6 +53,6 @@ app.listen(9900, '0.0.0.0', function (err) {
console.log(err)
return
}
console.log('SERVER: Listening at http://localhost:' + "9900" + '\n')
console.log('SERVER: Listening at http://localhost:' + "9900")
})
{
"name": "datavis",
"version": "0.1.10",
"version": "0.1.11",
"description": "A tool for visualizing the data collected from the IFS Earlham trip",
"main": "datavis.js",
"scripts": {
......
......@@ -234,7 +234,7 @@ const getStreamings = (request, response) => {
})
}
function serverOut(querytext){
console.info("DATABASE: " + querytext + "\n");
console.info("DATABASE: " + querytext);
}
function checkConnection(){
console.log('DATABASE: starting connection...');
......@@ -244,7 +244,7 @@ function checkConnection(){
console.log('SERVER: Halting...');
process.exit(1);
}else{
console.log('Database: connection successful!\n');
console.log('Database: connection successful!');
}
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment