Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dui123
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王天宇
Dui123
Commits
2fe45e02
Commit
2fe45e02
authored
Oct 26, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改服务器启动代码
parent
952061d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
www
server/bin/www
+13
-13
No files found.
server/bin/www
View file @
2fe45e02
...
...
@@ -12,7 +12,7 @@ let http = require('http');
* Get port from environment and store in Express.
*/
let
port
=
normalizePort
(
process
.
env
.
PORT
||
'300
0
'
);
let
port
=
normalizePort
(
process
.
env
.
PORT
||
'300
1
'
);
app
.
set
(
'port'
,
port
);
console
.
info
(
'port'
,
port
)
...
...
@@ -20,15 +20,15 @@ console.info('port',port)
* Create HTTP server.
*/
//
let server = http.createServer(app);
let
server
=
http
.
createServer
(
app
);
/**
* Listen on provided port, on all network interfaces.
*/
//
server.listen(port);
//
server.on('error', onError);
//
server.on('listening', onListening);
server
.
listen
(
port
);
server
.
on
(
'error'
,
onError
);
server
.
on
(
'listening'
,
onListening
);
/**
* Normalize a port into a number, string, or false.
...
...
@@ -81,11 +81,11 @@ function onError(error) {
/**
* Event listener for HTTP server "listening" event.
*/
//
//
function onListening() {
//
let addr = server.address();
//
let bind = typeof addr === 'string'
//
? 'pipe ' + addr
//
: 'port ' + addr.port;
//
debug('Listening on ' + bind);
//
}
function
onListening
()
{
let
addr
=
server
.
address
();
let
bind
=
typeof
addr
===
'string'
?
'pipe '
+
addr
:
'port '
+
addr
.
port
;
debug
(
'Listening on '
+
bind
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment