mirror of
https://github.com/strapi/strapi.git
synced 2025-07-18 22:45:47 +00:00
23 lines
353 B
JavaScript
23 lines
353 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Module dependencies
|
|
*/
|
|
|
|
// Node.js core.
|
|
const cluster = require('cluster');
|
|
|
|
// Public node modules.
|
|
const _ = require('lodash');
|
|
|
|
/**
|
|
* Programmatically restart the server
|
|
* (useful for the Studio)
|
|
*/
|
|
|
|
module.exports = function () {
|
|
_.forEach(cluster.worker, function () {
|
|
process.kill(process.pid, 'SIGHUP');
|
|
});
|
|
};
|