Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
e0b444e5
Commit
e0b444e5
authored
7 years ago
by
Dan Abramov
Committed by
GitHub
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Gracefully shut down the server on signals (#2246)
parent
4a321713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-scripts/scripts/start.js
+8
-0
packages/react-scripts/scripts/start.js
with
8 additions
and
0 deletions
+8
-0
packages/react-scripts/scripts/start.js
+
8
-
0
View file @
e0b444e5
...
@@ -84,6 +84,14 @@ choosePort(HOST, DEFAULT_PORT)
...
@@ -84,6 +84,14 @@ choosePort(HOST, DEFAULT_PORT)
console
.
log
(
chalk
.
cyan
(
'
Starting the development server...
\n
'
));
console
.
log
(
chalk
.
cyan
(
'
Starting the development server...
\n
'
));
openBrowser
(
urls
.
localUrlForBrowser
);
openBrowser
(
urls
.
localUrlForBrowser
);
});
});
[
'
SIGINT
'
,
'
SIGTERM
'
].
forEach
(
function
(
sig
)
{
process
.
on
(
sig
,
function
()
{
console
.
log
(
`Gracefully shutting down server after
${
sig
}
...`
);
server
.
close
();
process
.
exit
();
});
});
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
if
(
err
&&
err
.
message
)
{
if
(
err
&&
err
.
message
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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