Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.on("quit", () => {
logger.debug("nodemon has quit");
process.exit();
})
.on("restart", files => {
this.nuxt.hook("generate:done", () => {
logger.debug("Close the server connection");
server.close();
});
}
this.nuxt.hook("build:done", async generator => {
if (isStatic) {
logger.debug("Open the server connection");
statusfyOptions.siteConfig.build.isStatic = true;
const server = await createServer(
statusfyOptions.siteConfig,
null,
this.options.server.host,
this.options.server.port,
"/static/content"
);
this.nuxt.hook("generate:done", () => {
logger.debug("Close the server connection");
server.close();
});
}
const copyPublicFiles = async (src, dest) => {
if (src) {
logger.debug(`Copying public files ${dest}`);
try {
await fse.copy(src, dest);
} catch (error) {
logger.error(`Couldn't copy public files ${dest}`);
logger.error(error);
}
}
};
.on("crash", () => {
logger.debug("nodemon crashed for some reason");
});
};
.on("start", () => {
logger.debug("nodemon has started");
})
.on("quit", () => {