const https = require('https');
const app = require('./app');
const fs = require('fs');

const options = {
 // key: fs.readFileSync("/home/rnzca/public_html/Development/Evershop247/web_api/private.key"),
 // cert: fs.readFileSync("/home/rnzca/public_html/Development/Evershop247/web_api/ca_bundle_certificate.crt")

   key: fs.readFileSync("./private.key"),
   cert: fs.readFileSync("./ca_bundle_certificate.crt")
};

const port = process.env.PORT || 4400;
const server = https.createServer(options,app);
server.listen(port);
console.log("https://neoura.web.api.ulis.co.uk:"+port);