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

How do I get global variables within nodejs #42

Open
wyattbiker opened this issue Dec 10, 2015 · 0 comments
Open

How do I get global variables within nodejs #42

wyattbiker opened this issue Dec 10, 2015 · 0 comments

Comments

@wyattbiker
Copy link

I have this code below. but when I start into the nesh prompt, i cannot access the global variable myvar

Is there a context to access it from? i looked at global but was not there either

Also how do I exit nesh to continue running my application event loop.

//var keypress = require('keypress');
var nesh=require("nesh");
var myvar=123;
opts = {
    welcome: 'Welcome!',
    prompt: 'test> '
};

nesh.start(opts, function (err) {
if (err) {
   nesh.log.error(err);
}
});

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

1 participant