-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Any command, including exp-api -v, exits with 0 status without printing anything when it can't open src/config/database.js.
There are 4 issues:
-
exp-api -vshouldn't be looking for any files to begin with -
utils.checkLangAndDBdoesn't handle error from missing./src:
Line 86 in d39a7ce
let files = fs.readdirSync('./src/'); -
utils.checkLangAndDBattempts to print error from missing./src/config/database.jswithout importingchalk:
Lines 93 to 107 in d39a7ce
try { if (config.lang === 'js') { db = await fs.readFile('./src/config/database.js'); } else { db = await fs.readFile('./src/config/database.ts'); } db = db.toString(); } catch (error) { console.log( chalk.yellow(` Database config not detected in src/config. express-api-cli shall assume project default database config uses mongoose. Thank you. `) ); } -
all unhandled errors are swallowed:
express-api-cli/bin/generators.js
Line 175 in d39a7ce
} catch (error) {}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels