Skip to content

Commit

Permalink
Workaround with module.parent.id and modern mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
avevlad committed Jun 5, 2023
1 parent fc1bbb6 commit 9063ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ConnectApp
constructor: (options, startedCallback) ->
@name = options.name || "Server"
@port = options.port || "8080"
@root = options.root || path.dirname(module.parent.id)
@root = options.root || path.dirname(module?.parent?.id || ".")
@host = options.host || "localhost"
@debug = options.debug || false
@silent = options.silent || false
Expand Down

0 comments on commit 9063ad5

Please sign in to comment.