Browse Source

- 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.
test-gpt-generated
Roman Axelrod 3 years ago
parent
commit
bd5cafa549
  1. 4
      server.js

4
server.js

@ -131,7 +131,7 @@ app.get('/publish', async (req, res) => {
} }
if (responseData.uploadUrl) { 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 body = await fs.readFile(path.join(projectPath, 'dist.zip'));
const response = await fetch(`${responseData.uploadUrl}`, { const response = await fetch(`${responseData.uploadUrl}`, {
method: 'PUT', method: 'PUT',
@ -227,7 +227,7 @@ function startBrowserSync() {
return cb(); 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) browserSyncReload(bs, '', 'Template File Change: ' + file)
}); });

Loading…
Cancel
Save