Letsencrypt Trailpack for Trails
npm install trailpack-greenlockBe sure to have trailpack-express installed and configured.
Here is a very simple example:
``js`
module.exports = {
server: 'staging', // Set to https://acme-v01.api.letsencrypt.org/directory in production
email: 'john.doe@example.com',
agreeTos: true,
approvedDomains: ['example.com', 'www.example.com']
}
More information about the configuration possibilities here: https://git.daplie.com/Daplie/node-greenlock
`js``
// config/main.js
module.exports = {
// ...
packs: [
require('trailpack-core'),
require('trailpack-router'),
require('trailpack-express'),
require('trailpack-greenlock')
]
}
Letsencrypt can work only if you use 443 as secure port and 80 as default port so be sure to set them correctly