Compare commits

..

No commits in common. "master" and "refactor" have entirely different histories.

3 changed files with 9 additions and 10 deletions

View File

@ -2,7 +2,7 @@
require('dotenv').config();
const express = require('express');
//var https = require('https');
var https = require('https');
var bodyParser = require('body-parser');
const server = express();
const pg = require('pg');
@ -10,15 +10,14 @@ var fs = require('fs');
var readline = require('readline');
//-----------------------------point to ssl info------------------------------------
//var options = {
// key: fs.readFileSync(process.env.wd + 'key.pem'),
// cert: fs.readFileSync(process.env.wd + 'cert.pem'),
// passprase: []
//};
var options = {
key: fs.readFileSync(process.env.wd + 'key.pem'),
cert: fs.readFileSync(process.env.wd + 'cert.pem'),
passprase: []
};
//-----------------------------create server process--------------------------------
//https.createServer( /*options,*/ server).listen(process.env.nodeport, () => {
server.listen(process.env.nodeport, () => {
https.createServer(options, server).listen(process.env.nodeport, () => {
console.log('started on ' + process.env.nodeport)
});

View File

@ -1 +1 @@
curl -H "Content-Type: application/json" -X GET -d@./routes/baseline/req.json http://localhost:8082/baseline
curl -H "Content-Type: application/json" -X GET -d@./routes/baseline/req.json https://localhost:8082/baseline --insecure

View File

@ -1 +1 @@
curl -H "Content-Type: application/json" -X GET -d@./routes/scale/req_dcard.json http://localhost:8082/scale
curl -H "Content-Type: application/json" -X GET -d@./routes/scale/req_dcard.json https://localhost:8082/scale --insecure