g3k0
g3k0

Reputation: 157

load a no js external file in Node.js

I need to load in a Node.js module a file not written in JavaScript (it is an engine written in binary code)...this file is in the same directory of the entry point of module (index.js, starts the server) and of the app (server.js)... the engine needs some parameters to run and give some other data at the end of his work... Which is the best way to do this? Require fs module and call one of his methods? which one?

This will work for me? Read a file in Node.js

Upvotes: 0

Views: 55

Answers (1)

vodolaz095
vodolaz095

Reputation: 6986

if this file is standard binary executable file, you can start it by child process exec

http://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback

Upvotes: 1

Related Questions