Commit 06f88e7b authored by Patrick's avatar Patrick
Browse files

test server

parent 16d9e0ac
const http = require('http'); // Dependencies
const http = require('https');
const fs = require('fs'); const fs = require('fs');
const express = require('express') const http = require('http');
const app = express(); const https = require('https');
const bodyParser = require('body-parser') const express = require('express');
// app.use(bodyParser.urlencoded({ extended: false }))
// app.use(bodyParser.json())
const request = require('ajax-request');
// app.use(express.static('vcm'));
// app.listen(process.env.PORT || 8083);
// const app = express(); const app = express();
// Certificate // Certificate
const privateKey = fs.readFileSync('/etc/letsencrypt/live/umfrage.smartvillages.online/privkey.pem', 'utf8'); const privateKey = fs.readFileSync('/etc/letsencrypt/live/umfrage.smartvillages.online/privkey.pem', 'utf8');
...@@ -33,28 +26,9 @@ const httpServer = http.createServer(app); ...@@ -33,28 +26,9 @@ const httpServer = http.createServer(app);
const httpsServer = https.createServer(credentials, app); const httpsServer = https.createServer(credentials, app);
httpServer.listen(8085, () => { httpServer.listen(8085, () => {
console.log('HTTP Server running on port 80'); console.log('HTTP Server running on port 80');
}); });
httpsServer.listen(8083, () => { httpsServer.listen(8083, () => {
console.log('HTTPS Server running on port 8083'); console.log('HTTPS Server running on port 443');
}); });
\ No newline at end of file
// app.post('/addpoint', function(req,res){
// try {
// const data = req.body;
// console.log("data ==============")
// console.log(data.id);
// args.gmlid = data.id
// console.log(data[0]);
// console.log(data[1]);
// console.log("args ==============")
// console.log(args);
// }
// catch (err) {
// console.log('.../getSimS failed!\n' + err);
// }
// });
\ No newline at end of file
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