build resume on startup

This commit is contained in:
b1ek 2023-03-10 17:39:27 +10:00
parent 2cda8b607e
commit 6f74986b42
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,16 @@ require('dotenv').config({
if (process.env.APP_DEBUG == 'true') {
process.env.APP_DEBUG = true;
process.env.DEBUG = '*/*';
} else {
process.env.DEBUG = null;
process.env.NODE_DEBUG = null;
process.env.APP_DEBUG = false;
}
// build resume page
if ((!fs.existsSync('public/static/dist/resume.js')) && (!process.env.APP_DEBUG)) {
console.log('Resume files do not exist, building it automatically...');
exec('react/resume/build.sh');
}
// load key