"use strict"; var app = require("./app.js"); require("greenlock-express") .init({ packageRoot: __dirname, configDir: "./greenlock.d", // contact for security and critical bug notices maintainerEmail: "v.joszef@gmail.com", // whether or not to run at cloudscale cluster: false }) // Serves on 80 and 443 // Get's SSL certificates magically! .serve(app); /* 'use strict'; require('greenlock-express').create({ // Let's Encrypt v2 is ACME draft 11 version: 'draft-11' // Note: If at first you don't succeed, switch to staging to debug // https://acme-staging-v02.api.letsencrypt.org/directory , server: 'https://acme-v02.api.letsencrypt.org/directory' // Where the certs will be saved, MUST have write access , configDir: '~/.config/acme/' // You MUST change this to a valid email address , email: 'john.doe@example.com' // You MUST change these to valid domains // NOTE: all domains will validated and listed on the certificate , approveDomains: [ 'example.com', 'www.example.com' ] // You MUST NOT build clients that accept the ToS without asking the user , agreeTos: true , app: require('express')().use('/', function (req, res) { res.setHeader('Content-Type', 'text/html; charset=utf-8') res.end('Hello, World!\n\nšŸ’š šŸ”’.js'); }) // Join the community to get notified of important updates , communityMember: true // Contribute telemetry data to the project , telemetry: true //, debug: true }).listen(80, 443);*/