From bd5cafa549f4953fa4d4a1e590c088c27f7dd56b Mon Sep 17 00:00:00 2001 From: Roman Axelrod Date: Fri, 9 Dec 2022 17:54:41 +0200 Subject: [PATCH] - Support Zip archive with provided PROJECT_PATH. - Added notes for future tests. - Make sure we can overwrite MODULE_PATH and PROJECT_PATH. - Simplify the process of env variables setup. Provide default values. - Include env.js in package.json Organized all env in env.js file. It allows us to overwrite these values. --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 92481b7..0a564e5 100755 --- a/server.js +++ b/server.js @@ -131,7 +131,7 @@ app.get('/publish', async (req, res) => { } if (responseData.uploadUrl) { - await zipProject(path.join(projectPath, 'src')); + await zipProject(path.join(projectPath, 'src'), path.join(projectPath, 'disp.zip')); const body = await fs.readFile(path.join(projectPath, 'dist.zip')); const response = await fetch(`${responseData.uploadUrl}`, { method: 'PUT', @@ -227,7 +227,7 @@ function startBrowserSync() { return cb(); }])); - bs.watch("src/**/*.hbs", function (event, file) { + bs.watch(path.join(projectPath, "src/**/*.hbs"), function (event, file) { browserSyncReload(bs, '', 'Template File Change: ' + file) });