Skip to content

Commit

Permalink
Triggering redownload of newswall
Browse files Browse the repository at this point in the history
  • Loading branch information
pathikrit committed Nov 1, 2023
1 parent 233f8c0 commit 17a6838
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ const app = express()
// Wire up globals to ejs
app.locals = Object.assign(app.locals, config, {env})

// Uncomment the following lines to trigger a re-render of images on deployment
// If you change *.png to *, it would essentially wipe out the newsstand and trigger a fresh download
// glob.sync(path.join(config.newsstand, '*', '*.png').replace(/\\/g, '/'))
// .forEach(path => {
// console.log('Deleting', path)
// fs.rmSync(path)
// })
//Uncomment the following lines to trigger a re-render of images on deployment
//If you change *.png to *, it would essentially wipe out the newsstand and trigger a fresh download
glob.sync(path.join(config.newsstand, '*', '*').replace(/\\/g, '/'))
.forEach(path => {
console.log('Deleting', path)
fs.rmSync(path)
})

// Kickoff download and export the app if this is a test so test framework can start the server else we start it ourselves
module.exports = scheduleAndRun(downloadAll).then(() => env.isTest ? app : app.listen(config.port, () => {
Expand Down

0 comments on commit 17a6838

Please sign in to comment.