CHAPTER 9

image

Executing Code

This chapter’s concern is the execution of untrusted code. In this case, “untrusted” refers to code that is not part of your application or imported modules but can still be executed. This chapter’s specific focus is on two main use cases for running untrusted code. The first involves executing applications and scripts by spawning child processes. This use case allows Node applications to behave like a shell script, orchestrating multiple utility programs to achieve a larger goal. The second use case concerns the execution of JavaScript source code. While this scenario is not as common as process spawning, it is supported ...

Get Pro Node.js for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.