-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to set the working directory to enable relative requires #131
Comments
I would be willing to help implement it if you could point me in the right direction (where to look / add it) |
@jakubholynet I'll check and let you know. I forgot the reason why I set this |
Thanks! Good messages in commits / comments FTW :)
|
Try this fix 😄 Its a hack to make it work. While loading relative path, parent module file is set as Unfortunately This particular fix is tricky, Its not easy to show direction. Very sorry!!! |
I would like to be able to start Mancy from my Node project directory and be able to require files in it (
require("./my-project-file.js");
). It could either pick up the directory when starting or accept a setting / command line option to set the working directory.That way, it would be much easier to experiment with an existing project.
(Currently my workaround is to do
const root= "/absolute/path/to/project/dir/"; require(root + "my-project-file.js")
)Thank you!
The text was updated successfully, but these errors were encountered: