I am clear that nodemon and other modules are useful for me, to restart the server when I make changes to the files, but it is not what I want, I ask, how could I restart the node server at the moment I want ?, example:
app.post('/rein',(req, res, next) => {
//codigo para mandar a reinicar luego de la peticion
})