text: import https from "https";
  import fs from "fs";
  
  module.exports = app => {
  
  	const env = process.env.NODE_ENV;
  
  	if(env != "test "){
  
  		const credentials = {
  			key: fs.readFileSync("ntask.key", "utf8"),
  			cert: fs.readFileSync("ntask.cert", "utf8")
  		};
  
  		app.db.sequelize.sync().done(() => {
  			https.createServer(credentials, app)
  			.listen(app.get("port"), () => {
  				console.log(`NTask API - porta ${app.get("port")}`)
  			});
  		});
  	}	
  };