Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Web Application Development with Express
  • Table Of Contents Toc
Mastering Web Application Development with Express

Mastering Web Application Development with Express

By : Alexandru Vladutu
3.7 (3)
close
close
Mastering Web Application Development with Express

Mastering Web Application Development with Express

3.7 (3)
By: Alexandru Vladutu

Overview of this book

If you are a Node.js developer who wants to take your Express skills to the next level and develop high performing, reliable web applications using best practices, this book is ideal for you. The only prerequisite is knowledge of Node.js.
Table of Contents (13 chapters)
close
close
12
Index

Adding a REPL to our Express application


A Read-Eval-Print-Loop (REPL) is an interactive environment that accepts user input, evaluates it, and outputs the result back to the user.

It is possible to connect to a live, running application by using the replify (https://www.npmjs.org/package/replify) and repl-client (https://www.npmjs.org/package/repl-client) modules. The first one will add a REPL to our application, while the second one can be used to connect to it. The following are the commands to use replify and repl-client:

$ npm i replify
$ npm i repl-client –g

First, we should set up a quick sample application using the following code:

var replify = require('replify');
var express = require('express');
var app = express();

app.use(function(req, res, next) {
  res.send('all good');
});

app.listen(process.env.PORT || 7777);
replify('replify-app-' + process.pid, app);
console.log('Use the command below to connect to the REPL:');
console.log('rc /tmp/repl/replify-app-' + process.pid + '...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Web Application Development with Express
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon