Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Deploying Node.js

You're reading from   Deploying Node.js Learn how to build, test, deploy, monitor, and maintain your Node.js applications at scale

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781783981403
Length 274 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sandro Pasquali Sandro Pasquali
Author Profile Icon Sandro Pasquali
Sandro Pasquali
Arrow right icon
View More author details
Toc

Modifying behavior in changing environments


Modifying application data in a running system has been compared to changing the engine of a jet while it is in flight. Luckily, we developers work in a virtual world where the laws of physics are more forgiving. In this section, we will learn how to create a remote control for your Node applications using examples demonstrating how to monitor processes remotely.

Node REPL

Node's Read-Eval-Print-Loop (REPL) represents the Node shell. To enter the shell prompt, enter Node via your terminal without passing a filename:

> node

You now have access to a running Node process and can pass JavaScript commands to this process. For example, after entering 2+2, the shell would send 4 to stdout. Node's REPL is an excellent place to try out, debug, test, or otherwise play with JavaScript code.

Because REPL is a native object, programs can also use instances as a context in which to run JavaScript interactively. For example, here, we create our own custom function...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image