We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efebc1e commit 4f1cc7dCopy full SHA for 4f1cc7d
2 files changed
NodeServer/index.js
@@ -4,6 +4,7 @@ const { createServer } = require('http');
4
const WebSocket = require('ws');
5
6
const app = express();
7
+const port = 3000;
8
9
const server = createServer(app);
10
const wss = new WebSocket.Server({ server });
@@ -34,6 +35,6 @@ wss.on('connection', function(ws) {
34
35
});
36
37
-server.listen(8080, function() {
38
- console.log('Listening on http://localhost:8080');
+server.listen(port, function() {
39
+ console.log(`Listening on http://localhost:${port}`);
40
NodeServer/package.json
@@ -7,6 +7,9 @@
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
+ "engines": {
11
+ "node": "12.x"
12
+ },
13
"author": "",
14
"license": "ISC",
15
"dependencies": {
0 commit comments