change directory

This commit is contained in:
Paul Trowbridge 2019-03-25 13:32:51 -05:00
parent bb5f74a058
commit fdb54f4a8b

View File

@ -1,3 +1,5 @@
#!/usr/bin/env node
require('dotenv').config(); require('dotenv').config();
const express = require('express'); const express = require('express');
var https = require('https'); var https = require('https');
@ -11,12 +13,14 @@ var readline = require('readline');
//------------------------------------------------------- //-------------------------------------------------------
var options = { var options = {
key: fs.readFileSync('./key.pem'), key: fs.readFileSync('//var/www/forecast_api/key.pem'),
cert: fs.readFileSync('./cert.pem'), cert: fs.readFileSync('//var/www/forecast_api/cert.pem'),
passprase: [] passprase: []
}; };
https.createServer(options,server).listen(3000, () => console.log('started')); https.createServer(options,server).listen(3000, () => {
console.log('started on 3000')
});
//server.listen(3000, () => console.log('started')) //server.listen(3000, () => console.log('started'))
var Postgres = new pg.Client({ var Postgres = new pg.Client({
@ -43,9 +47,9 @@ Postgres.FirstRow = function (inSQL, args, inResponse) {
server.get('/', (req, res) => res.send('node.js express is up and running')) server.get('/', (req, res) => res.send('node.js express is up and running'))
server.get('/login', (req, res) => res.sendFile('//home/pt/forecast_api/msauth.html')) server.get('/login', (req, res) => res.sendFile('//var/www/forecast_api/msauth.html'))
server.get('/logs', (req, res) => res.sendFile('//home/pt/forecast_api/logs.html')) server.get('/logs', (req, res) => res.sendFile('//var/www/forecast_api/logs.html'))
server.get('/test_sql', function(req, res){ server.get('/test_sql', function(req, res){
@ -482,4 +486,4 @@ function build_where(req, c, w, d, args) {
} }
; ;
return { c, w, d }; return { c, w, d };
} }