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:
Jim LAURIE 2019-12-28 17:09:00 +01:00
parent ee0beca5ef
commit 4fd7713d08

View File

@ -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() {