mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
feat: allow custom exit code strapi.stop
You will be allow to customize the exit code for the strapi.stop function. fix #3197
This commit is contained in:
parent
ee0beca5ef
commit
4fd7713d08
@ -280,7 +280,7 @@ class Strapi extends EventEmitter {
|
||||
return this.stop();
|
||||
}
|
||||
|
||||
stop() {
|
||||
stop(exitCode = 1) {
|
||||
// Destroy server and available connections.
|
||||
this.server.destroy();
|
||||
|
||||
@ -289,7 +289,7 @@ class Strapi extends EventEmitter {
|
||||
}
|
||||
|
||||
// Kill process.
|
||||
process.exit(1);
|
||||
process.exit(exitCode);
|
||||
}
|
||||
|
||||
async load() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user