Skip to main content

Executing Code

  • Chapter
  • First Online:
Pro Node.js for Developers
  • 2709 Accesses

Abstract

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 in the Node core and should be understood as an alternative to eval().

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Colin J. Ihrig

About this chapter

Cite this chapter

Ihrig, C.J. (2013). Executing Code. In: Pro Node.js for Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-5861-2_9

Download citation

Publish with us

Policies and ethics