414 views +0 -0

Adapt Node app.js for Green Lock

To top of index.js file
Add:

'use strict';
// HTTP app to start,
var app = function(req, res) {

Under: // Make server
Remove:
var httpServer = http.createServer(function(req, res){

Above: // Route too handlers
Remove:
});
// Start the http server
httpServer.listen(3000, function(){
	console.log('The server is listening on port: 3000');
});

To bottom of file
Add:
};
module.exports = app;