Skip to content

Commit

Permalink
Add console log on rebuild complete
Browse files Browse the repository at this point in the history
  • Loading branch information
vikotar committed May 3, 2020
1 parent c7bc9f4 commit bc4f1d4
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 bc4f1d4

Please sign in to comment.