From 5851f9cacd5097c11a25d2b408eef0360cba5392 Mon Sep 17 00:00:00 2001 From: Surya Bumantara Date: Sat, 12 Oct 2024 11:12:35 +0700 Subject: [PATCH] edit pm2 ecosystem file --- ecosystem.config.js | 3 ++- src/utils/files.ts | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ecosystem.config.js b/ecosystem.config.js index dcc2201..0744530 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -3,7 +3,8 @@ module.exports = { apps : [{ name: 'artistica-api', script: 'npm run dev', - watch: true + watch: "src", + ignore_watch: "public", }], deploy : { diff --git a/src/utils/files.ts b/src/utils/files.ts index 8db780e..336ff23 100644 --- a/src/utils/files.ts +++ b/src/utils/files.ts @@ -20,9 +20,7 @@ export const uploadFile = async (file: FileUpload, uploadDir: string, fileName: const result = createWriteStream(join(__dirname, `../../public/${filePath}`)) stream.pipe(result) await finished(result) - console.log('file uploaded') - console.log(result) - console.log(filePath) + console.log('file uploaded: ', filePath) // part.file.pipe(writeStream);