Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request redwoodjs#504 from vikash-eatgeek/chore/rebuild_co…
…nsole_log

Add console log on rebuild complete
  • Loading branch information
peterp committed May 5, 2020
2 parents 3bb22fc + bc4f1d4 commit e8f5c05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/dev-server/src/main.ts
Expand Up @@ -185,8 +185,12 @@ app.all('/:routeName', async (req, res) => {

const reloadLambdas = () => {
console.log('Change detected, rebuilding...')
const start = new Date().getTime();
purgeRequireCache()
lambdaFunctions = requireLambdaFunctions(PATH)
const end = new Date().getTime();
const timeTakenInRebuild = end - start
console.log(`Done in ${timeTakenInRebuild}ms.`)
}

const startServer = () => app.listen(PORT, () => showHeader(lambdaFunctions))
Expand Down

0 comments on commit e8f5c05

Please sign in to comment.