-
Notifications
You must be signed in to change notification settings - Fork 48
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
No option to call ExecuteModule when using script as string and not as file #132
Comments
Thanks for trying this out. Regular Node has nothing like "executeModule" so we try to do it with as little weird stuff with it as possible. It's really a wrapper that's written in JavaScript itself that just calls "require" to get the module to run -- that's why you have to pass the module name as a string and not as a actual file. In general, Trireme uses as much regular Node code as possible, which means that module loading depends on being able to read files off the filesystem. That's what "require" does. Changing this would be a bunch of work, so first I'd like to see if we can figure out a way for you to work around this... |
thanks for your reply, i already look in the code and saw what you menthion. |
I'm glad that's working for you and I'm glad you figured out that you have I think that others might want to do this and the techniques are not On Fri, Sep 18, 2015 at 11:09 AM, ShukiLicht [email protected]
Greg Brail | apigee https://apigee.com/ | twitter @gbrail |
Hi,
I am working with your project and especially working with the concept of the execute the module one time and later call my script function several times from diffrent threads
the problem that there is a limitation in the code that you can't use the script as string but only as file.
Any solution for that? Or plan to fix it?
thanks,
Shuki
public ScriptFuture executeModule()
throws NodeException
{
if (scriptFile == null) {
throw new NodeException("Modules must be specified as a file name and not as a string");
}
The text was updated successfully, but these errors were encountered: