Skip to content

Commit

Permalink
fix: init logging
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jan 8, 2024
1 parent 2e830bf commit 40c1157
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,10 @@ class CoCreateLazyLoader {
const scriptsDirectory = './scripts';

try {
await fs.access(directory);
console.log("The directory exists.");
await fs.mkdir(scriptsDirectory, { recursive: true });
} catch (error) {
try {
await fs.mkdir(scriptsDirectory, { recursive: true });
console.log(`Scripts directory created at ${scriptsDirectory}`);
} catch (error) {
console.error('Error creating scripts directory:', error);
throw error; // Halt execution if directory creation fails
}
console.error('Error creating scripts directory:', error);
throw error; // Halt execution if directory creation fails
}

this.modules = await Config('modules', false, false)
Expand Down

0 comments on commit 40c1157

Please sign in to comment.