Skip to content

Commit

Permalink
server: update to es6 module
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 28, 2024
1 parent a853d73 commit afeeea9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Config {

function applyDefaults(cfg = {}, defaults = {}) {
for (const d in defaults) {
if (cfg[d] === undefined) {
if ([undefined, null].includes(cfg[d])) {
cfg[d] = defaults[d]
} else if (typeof cfg[d] === 'object' && typeof defaults[d] === 'object') {
cfg[d] = applyDefaults(cfg[d], defaults[d])
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'

const { start } = require('./routes/index')
import { start } from './routes/index.js'

start()

0 comments on commit afeeea9

Please sign in to comment.