Skip to content
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

Set the working directory #185

Open
Guichaguri opened this issue Jul 30, 2016 · 5 comments
Open

Set the working directory #185

Guichaguri opened this issue Jul 30, 2016 · 5 comments

Comments

@Guichaguri
Copy link

Guichaguri commented Jul 30, 2016

The working directory is used by the file system in Node.JS applications. Currently, it's set to the java working directory.
Is there a way to set the working directory?
If not, can this be implemented?

@Guichaguri
Copy link
Author

Also, how do I prevent the process termination when a Node.JS application crashes?
I've tried try catch and SecurityManager and had no luck

@irbull
Copy link
Member

irbull commented Aug 3, 2016

@Guichaguri Can you provide an example of a Node.js crash that you are trying to prevent?

@Guichaguri
Copy link
Author

Guichaguri commented Aug 3, 2016

@irbull

var fs = require('fs');

fs.readFileSync('invalid-file.json'); // Crash

A simple throw new Error(); also exits the process

For now I'm listening to the uncaughtException event to prevent exceptions terminating the process and not just the Node.JS instance. I hope there is a workaround for this, but I think it's hard coded into Node

@e8kor
Copy link

e8kor commented Mar 2, 2017

Im also interested in solving issue with working directory or is there any workaround?

@e8kor
Copy link

e8kor commented May 23, 2017

Im creating two v8, doing process.chdir('some-path') for one and for some strange reason process directory of another lambda is also changed. Why its happening this way? It looks like Reason Is that I can only create node js with global alias only, can I create it with some custom alias ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants