Skip to content

Commit ce76897

Browse files
committed
port variable
1 parent d3bfbda commit ce76897

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const path = require('path');
66
const Corrosion = require('corrosion');
77
const Unblocker = require('unblocker');
88

9+
const useSSL = false;
10+
const port = 3000;
11+
912
const app = express();
1013

1114
const proxy = new Corrosion({
@@ -40,8 +43,6 @@ const unblocker = Unblocker({
4043

4144
app.use(unblocker);
4245

43-
const useSSL = false;
44-
4546
let server;
4647

4748
if (useSSL) {
@@ -55,8 +56,8 @@ if (useSSL) {
5556
server = http.createServer(app);
5657
}
5758

58-
server.listen(3000, () => {
59-
console.log(`Server is listening on port 3000${useSSL ? ' with SSL' : ''}`);
59+
server.listen(port, () => {
60+
console.log(`Server is listening on port ${port} ${useSSL ? ' with SSL' : ''}`);
6061
});
6162

6263
server.on('upgrade', (request, socket, head) => {

0 commit comments

Comments
 (0)