将https添加到bin / www

时间:2015-12-15 16:11:06

标签: node.js express

如何将https(require('https').createServer(options, onConnection).listen(443);)添加到bin / www:

#!/usr/bin/env node
var debug = require('debug')('test');
var app = require('../app');

app.set('port', process.env.PORT || 3000);

var server = app.listen(app.get('port'), function() {
    debug('Express server listening on port ' + server.address().port);
});

0 个答案:

没有答案