www 868 Bytes
#!/usr/bin/env node

/**
 * Module dependencies.
 */

 var app = require("../app");
 var https = require("https");
 var path = require('path');
 var fs = require("fs");
 
 const domain = "도메인주소 입력";
 const sslport = 3000;
 
 const option = {
   ca: fs.readFileSync("/etc/letsencrypt/live/" + domain + "/fullchain.pem"),
   key: fs
     .readFileSync(
       path.resolve(
         process.cwd(),
         "/etc/letsencrypt/live/" + domain + "/privkey.pem"
       ),
       "utf8"
     )
     .toString(),
   cert: fs
     .readFileSync(
       path.resolve(
         process.cwd(),
         "/etc/letsencrypt/live/" + domain + "/cert.pem"
       ),
       "utf8"
     )
     .toString(),
 };
 
 /**
  * Create HTTPS server.
  */
 https.createServer(option, app).listen(sslport, () => {
   console.log(`[HTTPS] Server is started on port ${sslport}`);
 });