Skip to content

Commit

Permalink
fix: use dotRelative glob option (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlau authored Mar 7, 2023
1 parent d28e260 commit e58ede6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const scriptsToLoad = process.env.SCRIPTS || './scripts/**/*.js'
const { app, events } = require('./app')

// load all the files in the scripts folder
globSync(scriptsToLoad).forEach((file) => {
globSync(scriptsToLoad, { dotRelative: true }).forEach((file) => {
logger.info('Loading:', file)
require(`./${file}`)(app, events)
require(file)(app, events)
})

app.listen(port, () => {
Expand Down

0 comments on commit e58ede6

Please sign in to comment.