从无法访问的项目Fork
#!/usr/bin/env node const http = require('http');
const https = require('https');
const app = require('../app'); const {
httpPort, httpsPort, credentials,
} = require('../environment'); const httpServer = http.createServer(app);
httpServer.listen(httpPort); console.info(`http: listening on port ${httpPort}`); if (credentials) { const httpsServer = https.createServer(credentials, app); httpsServer.listen(httpsPort); console.info(`https: listening on port ${httpsPort}`); }