When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser:
Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.
This is what the real meat of my greenlock.js file looks like:
var path = require('path');
var os = require('os')
var Greenlock = require('greenlock');
var GreenlockExpress = require('greenlock-express')
var greenlock = GreenlockExpress.create({
version: 'draft-12',
email: 'john.doe@yahoo.com',
agreeTos: true,
server: 'https://acme-v02.api.letsencrypt.org/directory',
approveDomains: approveDomains,
app: function (req, res) {
console.log(req.url);
var myapp = require("./server.ts");
console.log(myapp.toString());
myapp(req, res);
},
store: store,
renewBy: 10 * 24 * 60 * 60 * 1000,
renewWithin: 14 * 24 * 60 * 60 * 1000
});
I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts?
Also FWIW, the server.ts file does export an Express app: module.exports = app;
When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser:
```Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.```
This is what the real meat of my `greenlock.js` file looks like:
```
var path = require('path');
var os = require('os')
var Greenlock = require('greenlock');
var GreenlockExpress = require('greenlock-express')
var greenlock = GreenlockExpress.create({
version: 'draft-12',
email: 'john.doe@yahoo.com',
agreeTos: true,
server: 'https://acme-v02.api.letsencrypt.org/directory',
approveDomains: approveDomains,
app: function (req, res) {
console.log(req.url);
var myapp = require("./server.ts");
console.log(myapp.toString());
myapp(req, res);
},
store: store,
renewBy: 10 * 24 * 60 * 60 * 1000,
renewWithin: 14 * 24 * 60 * 60 * 1000
});
```
I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts?
[https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/efd7693dcd9622bae768658066f55cff17bc2605/index.js](http://)
Also FWIW, the `server.ts` file does export an Express app: `module.exports = app;`
You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README.
It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.
Just seeing this.
You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README.
It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.
When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser:
Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.
This is what the real meat of my
greenlock.js
file looks like:I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts?
https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/efd7693dcd9622bae768658066f55cff17bc2605/index.js
Also FWIW, the
server.ts
file does export an Express app:module.exports = app;
Just seeing this.
You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README.
It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.
Closing since this is old, but feel free to re-open if needed.