File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 55
55
http.createServer(function (req, res) {
56
56
res.writeHead(200, {'Content-Type': 'text/plain'});
57
57
res.end('Hello World\n');
58
- }).listen(8124 , "127.0.0.1");
59
- console.log('Server running at http://127.0.0.1:8124 /');
58
+ }).listen(1337 , "127.0.0.1");
59
+ console.log('Server running at http://127.0.0.1:1337 /');
60
60
</ pre >
61
61
62
62
< p >
66
66
</ p >
67
67
< pre class ="sh_none ">
68
68
% node example.js
69
- Server running at http://127.0.0.1:8124 /</ pre >
69
+ Server running at http://127.0.0.1:1337 /</ pre >
70
70
71
71
< p >
72
- Here is an example of a simple TCP server which listens on port 8124
72
+ Here is an example of a simple TCP server which listens on port 1337
73
73
and echoes whatever you send it:
74
74
</ p >
75
75
79
79
var server = net.createServer(function (socket) {
80
80
socket.write("Echo server\r\n");
81
81
socket.pipe(socket);
82
- })
82
+ });
83
83
84
- server.listen(8124 , "127.0.0.1");
84
+ server.listen(1337 , "127.0.0.1");
85
85
</ pre >
86
86
87
87
< p >
You can’t perform that action at this time.
0 commit comments