0% found this document useful (0 votes)
85 views

Full Download Web Development With Node and Express Leveraging The JavaScript Stack 2nd Edition Ethan Brown PDF

Brown

Uploaded by

daraniqurbet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Full Download Web Development With Node and Express Leveraging The JavaScript Stack 2nd Edition Ethan Brown PDF

Brown

Uploaded by

daraniqurbet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Download the full version of the textbook now at textbookfull.

com

Web Development with Node and Express


Leveraging the JavaScript Stack 2nd Edition
Ethan Brown

https://textbookfull.com/product/web-development-
with-node-and-express-leveraging-the-javascript-
stack-2nd-edition-ethan-brown/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 2nd Edition Vasan Subramanian

https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-2nd-edition-vasan-
subramanian/
textbookfull.com

Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node Vasan Subramanian

https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-vasan-subramanian/

textbookfull.com

Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 1st Edition Vasan Subramanian
(Auth.)
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-1st-edition-vasan-
subramanian-auth/
textbookfull.com

Problems in organic structure determination : a practical


approach to NMR spectroscopy First Issued In Hardback
2017. Edition Linington
https://textbookfull.com/product/problems-in-organic-structure-
determination-a-practical-approach-to-nmr-spectroscopy-first-issued-
in-hardback-2017-edition-linington/
textbookfull.com
Theory and Applications of Satisfiability Testing SAT 2020
23rd International Conference Alghero Italy July 3 10 2020
Proceedings Lecture Notes in Computer Science 12178 Luca
Pulina (Editor)
https://textbookfull.com/product/theory-and-applications-of-
satisfiability-testing-sat-2020-23rd-international-conference-alghero-
italy-july-3-10-2020-proceedings-lecture-notes-in-computer-
science-12178-luca-pulina-editor/
textbookfull.com

Barriers to Entry: Overcoming Challenges and Achieving


Breakthroughs in a Chinese Workplace Paul Ross

https://textbookfull.com/product/barriers-to-entry-overcoming-
challenges-and-achieving-breakthroughs-in-a-chinese-workplace-paul-
ross/
textbookfull.com

Yoga rising 30 empowering stories from yoga renegades for


every body First Edition Melanie C. Klein

https://textbookfull.com/product/yoga-rising-30-empowering-stories-
from-yoga-renegades-for-every-body-first-edition-melanie-c-klein/

textbookfull.com

Computational Data and Social Networks 8th International


Conference CSoNet 2019 Ho Chi Minh City Vietnam November
18 20 2019 Proceedings Andrea Tagarelli
https://textbookfull.com/product/computational-data-and-social-
networks-8th-international-conference-csonet-2019-ho-chi-minh-city-
vietnam-november-18-20-2019-proceedings-andrea-tagarelli/
textbookfull.com

The Economics of Women, Men, and Work Francine D. Blau

https://textbookfull.com/product/the-economics-of-women-men-and-work-
francine-d-blau/

textbookfull.com
A New History of Iowa Bremer

https://textbookfull.com/product/a-new-history-of-iowa-bremer/

textbookfull.com
1. Preface

a. Who This Book Is For


b. Notes on the Second Edition
c. How This Book Is Organized
d. Example Website
e. Conventions Used in This Book
f. Using Code Examples
g. O’Reilly Online Learning
h. How to Contact Us
i. Acknowledgments

2. 1. Introducing Express

a. The JavaScript Revolution


b. Introducing Express
c. Server-Side and Client-Side Applications
d. A Brief History of Express
e. Node: A New Kind of Web Server
f. The Node Ecosystem
g. Licensing
h. Conclusion
3. 2. Getting Started with Node

a. Getting Node
b. Using the Terminal
c. Editors
d. npm
e. A Simple Web Server with Node

i. Hello World
ii. Event-Driven Programming
iii. Routing
iv. Serving Static Resources

f. Onward to Express

4. 3. Saving Time with Express

a. Scaffolding
b. The Meadowlark Travel Website
c. Initial Steps

i. Views and Layouts


ii. Static Files and Views
iii. Dynamic Content in Views
iv. Conclusion
5. 4. Tidying Up

a. File and Directory Structure


b. Best Practices
c. Version Control
d. How to Use Git with This Book

i. If You’re Following Along by Doing It


Yourself
ii. If You’re Following Along by Using the
Official Repository

e. npm Packages
f. Project Metadata
g. Node Modules
h. Conclusion

6. 5. Quality Assurance
a. The QA Plan
b. QA: Is It Worth It?
c. Logic Versus Presentation
d. The Types of Tests
e. Overview of QA Techniques
f. Installing and Configuring Jest
g. Unit Testing

i. Mocking
ii. Refactoring the Application for Testability
iii. Writing Our First Test
iv. Test Maintenance
v. Code Coverage

h. Integration Testing
i. Linting
j. Continuous Integration
k. Conclusion

7. 6. The Request and Response Objects


a. The Parts of a URL
b. HTTP Request Methods
c. Request Headers
d. Response Headers
e. Internet Media Types
f. Request Body
g. The Request Object
h. The Response Object
i. Getting More Information
j. Boiling It Down

i. Rendering Content
ii. Processing Forms
iii. Providing an API

k. Conclusion

8. 7. Templating with Handlebars


a. There Are No Absolute Rules Except This One
b. Choosing a Template Engine
c. Pug: A Different Approach
d. Handlebars Basics
i. Comments
ii. Blocks
iii. Server-Side Templates
iv. Views and Layouts
v. Using Layouts (or Not) in Express
vi. Sections
vii. Partials
viii. Perfecting Your Templates

e. Conclusion
9. 8. Form Handling

a. Sending Client Data to the Server


b. HTML Forms
c. Encoding
d. Different Approaches to Form Handling
e. Form Handling with Express
f. Using Fetch to Send Form Data
g. File Uploads

i. File Uploads with Fetch

h. Improving File Upload UI


i. Conclusion
10. 9. Cookies and Sessions

a. Externalizing Credentials
b. Cookies in Express
c. Examining Cookies
d. Sessions

i. Memory Stores
ii. Using Sessions
e. Using Sessions to Implement Flash Messages
f. What to Use Sessions For
g. Conclusion

11. 10. Middleware

a. Middleware Principles
b. Middleware Examples
c. Common Middleware
d. Third-Party Middleware
e. Conclusion

12. 11. Sending Email


a. SMTP, MSAs, and MTAs
b. Receiving Email
c. Email Headers
d. Email Formats
e. HTML Email
f. Nodemailer

i. Sending Mail
ii. Sending Mail to Multiple Recipients
g. Better Options for Bulk Email
h. Sending HTML Email
i. Images in HTML Email
ii. Using Views to Send HTML Email
iii. Encapsulating Email Functionality
i. Conclusion

13. 12. Production Concerns

a. Execution Environments
b. Environment-Specific Configuration
c. Running Your Node Process
d. Scaling Your Website

i. Scaling Out with App Clusters


ii. Handling Uncaught Exceptions
iii. Scaling Out with Multiple Servers

e. Monitoring Your Website


i. Third-Party Uptime Monitors

f. Stress Testing
g. Conclusion

14. 13. Persistence

a. Filesystem Persistence
b. Cloud Persistence
c. Database Persistence

i. A Note on Performance
ii. Abstracting the Database Layer
iii. Setting Up MongoDB
iv. Mongoose
v. Database Connections with Mongoose
vi. Creating Schemas and Models
vii. Seeding Initial Data
viii. Retrieving Data
ix. Adding Data
x. PostgreSQL
xi. Adding Data
d. Using a Database for Session Storage
e. Conclusion

15. 14. Routing

a. Routes and SEO


b. Subdomains
c. Route Handlers Are Middleware
d. Route Paths and Regular Expressions
e. Route Parameters
f. Organizing Routes
g. Declaring Routes in a Module
h. Grouping Handlers Logically
i. Automatically Rendering Views
j. Conclusion
16. 15. REST APIs and JSON
a. JSON and XML
b. Our API
c. API Error Reporting
d. Cross-Origin Resource Sharing
e. Our Tests
f. Using Express to Provide an API
g. Conclusion

17. 16. Single-Page Applications

a. A Short History of Web Application Development


b. SPA Technologies
c. Creating a React App
d. React Basics

i. The Home Page


ii. Routing
iii. Vacations Page—Visual Design
iv. Vacations Page—Server Integration
v. Sending Information to the Server
vi. State Management
vii. Deployment Options
e. Conclusion

18. 17. Static Content


a. Performance Considerations
b. Content Delivery Networks
c. Designing for CDNs
i. Server-Rendered Website
ii. Single-Page Applications

d. Caching Static Assets


Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
e. Changing Your Static Content
f. Conclusion
19. 18. Security

a. HTTPS

i. Generating Your Own Certificate


ii. Using a Free Certificate Authority
iii. Purchasing a Certificate
iv. Enabling HTTPS for Your Express App
v. A Note on Ports
vi. HTTPS and Proxies
b. Cross-Site Request Forgery
c. Authentication

i. Authentication Versus Authorization


ii. The Problem with Passwords
iii. Third-Party Authentication
iv. Storing Users in Your Database
v. Authentication Versus Registration and the
User Experience
vi. Passport
vii. Role-Based Authorization
viii. Adding Authentication Providers

d. Conclusion
20. 19. Integrating with Third-Party APIs
a. Social Media

i. Social Media Plugins and Site Performance


ii. Searching for Tweets
iii. Rendering Tweets

b. Geocoding

i. Geocoding with Google


ii. Geocoding Your Data
iii. Displaying a Map

c. Weather Data
d. Conclusion
21. 20. Debugging

a. The First Principle of Debugging


b. Take Advantage of REPL and the Console
c. Using Node’s Built-in Debugger
d. Node Inspector Clients
e. Debugging Asynchronous Functions
f. Debugging Express
g. Conclusion

22. 21. Going Live


a. Domain Registration and Hosting
i. Domain Name System
ii. Security
iii. Top-Level Domains
iv. Subdomains
v. Nameservers
vi. Hosting
vii. Deployment

b. Conclusion
23. 22. Maintenance

a. The Principles of Maintenance

i. Have a Longevity Plan


ii. Use Source Control
iii. Use an Issue Tracker
iv. Exercise Good Hygiene
v. Don’t Procrastinate
vi. Do Routine QA Checks
vii. Monitor Analytics
viii. Optimize Performance
ix. Prioritize Lead Tracking
x. Prevent “Invisible” Failures

b. Code Reuse and Refactoring


i. Private npm Registry
ii. Middleware
c. Conclusion

24. 23. Additional Resources


a. Online Documentation
b. Periodicals
c. Stack Overflow
d. Contributing to Express
e. Conclusion

25. Index
Web Development with
Node and Express
Leveraging the JavaScript Stack

SECOND EDITION

Ethan Brown
Web Development with Node and Express

by Ethan Brown

Copyright © 2020 Ethan Brown. All rights reserved.

Printed in the United States of America.

Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,


Sebastopol, CA 95472.

O’Reilly books may be purchased for educational, business, or sales


promotional use. Online editions are also available for most titles
(http://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
corporate@oreilly.com.

Acquisitions Editor: Jennifer Pollock

Developmental Editor: Angela Rufino

Production Editor: Nan Barber

Copyeditor: Kim Wimpsett

Proofreader: Sharon Wilkey

Indexer: WordCo Indexing Services, Inc.

Interior Designer: David Futato

Cover Designer: Karen Montgomery


Illustrator: Rebecca Demarest

November 2019: Second Edition


Revision History for the Second Edition
2019-11-12: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781492053514 for release


details.

The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Web


Development with Node and Express, the cover image, and related trade
dress are trademarks of O’Reilly Media, Inc.

The views expressed in this work are those of the author, and do not
represent the publisher’s views. While the publisher and the author have
used good faith efforts to ensure that the information and instructions
contained in this work are accurate, the publisher and the author disclaim
all responsibility for errors or omissions, including without limitation
responsibility for damages resulting from the use of or reliance on this
work. Use of the information and instructions contained in this work is at
your own risk. If any code samples or other technology this work contains
or describes is subject to open source licenses or the intellectual property
rights of others, it is your responsibility to ensure that your use thereof
complies with such licenses and/or rights.

978-1-492-05351-4

[LSI]
Dedication

This book is dedicated to my family:

My father, Tom, who gave me a love of engineering; my mother, Ann,


who gave me a love of writing; and my sister, Meris, who has been a
constant companion.
Preface
Who This Book Is For
This book is for programmers who want to create web applications
(traditional websites; single-page applications with React, Angular, or
Vue; REST APIs; or anything in between) using JavaScript, Node, and
Express. One of the exciting aspects of Node development is that it has
attracted a whole new audience of programmers. The accessibility and
flexibility of JavaScript have attracted self-taught programmers from all
over the world. At no time in the history of computer science has
programming been so accessible. The number and quality of online
resources for learning to program (and getting help when you get stuck) is
truly astonishing and inspiring. So to those new (possibly self-taught)
programmers, I welcome you.

Then, of course, there are the programmers like me, who have been
around for a while. Like many programmers of my era, I started off with
assembler and BASIC and went through Pascal, C++, Perl, Java, PHP,
Ruby, C, C#, and JavaScript. At university, I was exposed to more niche
languages such as ML, LISP, and PROLOG. Many of these languages are
near and dear to my heart, but in none of these languages do I see so much
promise as I do in JavaScript. So I am also writing this book for
programmers like myself, who have a lot of experience and perhaps a
more philosophical outlook on specific technologies.

No experience with Node is necessary, but you should have some


experience with JavaScript. If you’re new to programming, I recommend
Codecademy. If you’re an intermediate or experienced programmer, I
recommend my own book, Learning JavaScript, 3rd Edition (O’Reilly).
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
The examples in this book can be used with any system that Node works
on (which covers Windows, macOS, and Linux, among others). The
examples are geared toward command-line (terminal) users, so you should
have some familiarity with your system’s terminal.

Most important, this book is for programmers who are excited. Excited
about the future of the internet and want to be part of it. Excited about
learning new things, new techniques, and new ways of looking at web
development. If, dear reader, you are not excited, I hope you will be by the
time you reach the end of this book….

Notes on the Second Edition


It was a joy to write the first edition of this book, and I am to this day
pleased with the practical advice I was able to put into it and the warm
response of my readers. The first edition was published just as Express 4.0
was released from beta, and while Express is still on version 4.x, the
middleware and tools that go along with Express have undergone massive
changes. Furthermore, JavaScript itself has evolved, and even the way
web applications are designed has undergone a tectonic shift (away from
pure server-side rendering and toward single-page applications [SPAs]).
While many of the principles in the first edition are still useful and valid,
the specific techniques and tools are almost completely different. A new
edition is overdue. Because of the ascendancy of SPAs, the focus of this
second edition has also shifted to place more emphasis on Express as a
server for APIs and static assets, and it includes an SPA example.
How This Book Is Organized
Chapter 1 and Chapter 2 will introduce you to Node and Express and some
of the tools you’ll be using throughout the book. In Chapter 3 and
Chapter 4, you start using Express and build the skeleton of a sample
website that will be used as a running example throughout the rest of the
book.

Chapter 5 discusses testing and QA, and Chapter 6 covers some of Node’s
more important constructs and how they are extended and used by
Express. Chapter 7 covers templating (using Handlebars), which lays the
foundation of building useful websites with Express. Chapter 8 and
Chapter 9 cover cookies, sessions, and form handlers, rounding out the
things you need to know to build basic functional websites with Express.

Chapter 10 delves into middleware, a concept central to Express.


Chapter 11 explains how to use middleware to send email from the server
and discusses security and layout issues inherent to email.

Chapter 12 offers a preview into production concerns. Even though at this


stage in the book you don’t have all the information you need to build a
production-ready website, thinking about production now can save you
from major headaches in the future.

Chapter 13 is about persistence, with a focus on MongoDB (one of the


leading document databases) and PostgreSQL (a popular open-source
relational database management system).

Chapter 14 gets into the details of routing with Express (how URLs are
mapped to content), and Chapter 15 takes a diversion into writing APIs
with Express. Chapter 17 covers the details of serving static content, with
a focus on maximizing performance.

Chapter 18 discusses security: how to build authentication and


authorization into your app (with a focus on using a third-party
authentication provider), as well as how to run your site over HTTPS.

Chapter 19 explains how to integrate with third-party services. Examples


used are Twitter, Google Maps, and the US National Weather Service.

Chapter 16 takes what we’ve learned about Express and uses it to refactor
the running example as an SPA, with Express as the backend server
providing the API we created in Chapter 15.

Chapter 20 and Chapter 21 get you ready for the big day: your site launch.
They cover debugging, so you can root out any defects before launch, and
the process of going live. Chapter 22 talks about the next important (and
oft-neglected) phase: maintenance.

The book concludes with Chapter 23, which points you to additional
resources, should you want to further your education about Node and
Express, and where you can go to get help.

Example Website
Starting in Chapter 3, a running example will be used throughout the
book: the Meadowlark Travel website. I wrote the first edition just after
getting back from a trip to Lisbon, and I had travel on my mind, so the
example website I chose is for a fictional travel company in my home state
of Oregon (the Western Meadowlark is the state songbird of Oregon).
Meadowlark Travel allows travelers to connect to local “amateur tour
guides,” and it partners with companies offering bike and scooter rentals
and local tours, with a focus on ecotourism.

Like any pedagogical example, the Meadowlark Travel website is


contrived, but it is an example that covers many of the challenges facing
real-world websites: third-party component integration, geolocation,
ecommerce, performance, and security.

As the focus on this book is backend infrastructure, the example website


will not be complete; it merely serves as a fictional example of a real-
world website to provide depth and context to the examples. Presumably,
you are working on your own website, and you can use the Meadowlark
Travel example as a template for it.

Conventions Used in This Book


The following typographical conventions are used in this book:

Italic
Indicates new terms, URLs, email addresses, filenames, and file
extensions.

Constant width
Used for program listings, as well as within paragraphs to refer to
program elements such as variable or function names, databases, data
types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the
user.
Constant width italic
Shows text that should be replaced with user-supplied values or by
values determined by context.

TIP
This element signifies a tip or suggestion.

NOTE
This element signifies a general note.

WARNING
This element indicates a warning or caution.

Using Code Examples


Supplemental material (code examples, exercises, etc.) is available for
download at https://github.com/EthanRBrown/web-development-with-
node-and-express-2e.

This book is here to help you get your job done. In general, if example
code is offered with this book, you may use it in your programs and
documentation. You do not need to contact us for permission unless
you’re reproducing a significant portion of the code. For example, writing
a program that uses several chunks of code from this book does not
Random documents with unrelated
content Scribd suggests to you:
The Project Gutenberg eBook of The
robbers' cave
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: The robbers' cave


A tale of Italy

Author: A. L. O. E.

Release date: May 20, 2024 [eBook #73660]

Language: English

Original publication: Chicago: The Bible Colportage Association, 1899

*** START OF THE PROJECT GUTENBERG EBOOK THE ROBBERS'


CAVE ***
Transcriber's note: Unusual and inconsistent spelling is
as printed.

A STRUGGLE FOR LIFE.


The Robbers' Cave

A TALE OF ITALY

BY

A. L. O. E.

CHICAGO

The Bible Institute Colportage Association

843-845 North Wells Street

CONTENTS

CHAP.
I. THE CALABRIAN INN

II. A SUSPICIOUS CHARACTER

III. BITTER WORDS

IV. SEPARATION

V. ROUGH COMPANY

VI. THE ROBBERS' CAVE

VII. MUSIC AND MADNESS

VIII. A DASH FOR FREEDOM

IX. ANXIOUS HOURS

X. THE LONE SENTINEL

XI. THE ORPHAN'S TALE

XII. HOW THE LIGHT WAS LIT

XIII. FAILURE

XIV. TIDINGS

XV. ONWARDS

XVI. A PERILOUS PASS

XVII. ONE EFFORT MORE

XVIII. VICTORY
Printed in United States of America

The Robbers' Cave.

A TALE OF ITALY.

CHAPTER I.
THE CALABRIAN INN.

"Lazy dog! Can't he drive faster—keeping us grilling


here in the heat! I should like to have the use of his whip
for a few minutes and try its effect upon his shoulders!"
Such was the impatient exclamation of Horace Cleveland, as
for the third time he thrust his head out of the carriage
window.

"I wish that we had never come to Calabria at all!"


sighed his mother. Horace was resuming his lounging
position in the carriage, after hurling a few Italian words of
abuse at the driver, as she added, "It was a nonsensical
whim of yours, Horace, to bring us into this wild land, when
we might have remained in comfort at Naples, with every
convenience around us, such as my weak health so much
requires."

"Convenience!" repeated Horace contemptuously.


"Would you compare the luxuries of Naples, its drives, its
bouquets, its ices, its idle amusements, with the glorious
scenery of a land like this? Look what a splendid mountain
rises there, all clothed to the very summit with myrtle,
aloes, and cactus, where here and there stands a tall palm,
like the king of the forest, overlooking the rest. And see
what an expanse—what an ocean of olives stretches
yonder!"

"I do not admire the olive, with its rugged stem and dull
dingy leaves," observed Mrs. Cleveland.

"Not when the breeze ruffles those leaves, and shows


their silver linings? Look there now,—how beautiful they
appear under the brightness of an Italian sky!"

"I am too weary to admire anything," said Mrs.


Cleveland with a yawn, "and it seems as if we were never to
reach the inn at Staiti. The heat is almost suffocating."

"I say," halloed Horace to the driver, "how long shall we


be in arriving at Staiti?"

The Italian shrugged his shoulders, and without taking


the trouble to turn round made reply, "We shall not be there
till twenty-four o'clock, signore."

"Twenty-four o'clock!" exclaimed Horace; not surprised,


however, by the expression, as the reader may possibly be,
as he was familiar with the Italian mode of reckoning the
twenty-four hours from sunset to sunset. "Is there no inn,—
no locanda, where we could rest on the way?"

"Si, signore," answered the Calabrese, pointing onwards


with his whip to a small, irregularly built house, which
seemed wedged between two masses of rock overgrown
with cactus, and which was so much of the color of the
cliffs, that one might fancy that it had grown out of them.

"It looks much more picturesque than comfortable,"


observed Horace, drawing back his head, and showing the
inn to his mother.

"Let's stop there—or anywhere," gasped Mrs. Cleveland,


fanning herself with the air of one whose patience as well as
strength is almost exhausted. "I can go no further to-day."

"We can stop and bait," said Horace; and again he


leaned out of the window to give his orders to the driver in
the haughty tone of command which he seemed to think
befitting an English "milordo."

It was clear at a glance that Horace Cleveland regarded


himself as one of the lords of creation, and, from national or
family or personal pride, considered himself superior to all
such of his fellow-creatures as he might meet in Calabria.
His manner, even to his mother, was petulant and
imperious. Horace Cleveland had had, indeed, much to
foster his vanity and strengthen his pride. Horace occupied
a proud position in his school, and he plumed himself not a
little upon it.

"The boy is father of the man," sang the poet; and on


the strength of that aphorism, Horace built up a high tower
of airy hopes. He had been accustomed to be admired,
imitated, followed, in the little world of a public school, and
he expected to hold the same place in the great world,
which he soon must enter. Horace felt himself born to
command.

The youth's triumphs at school had hardly tended to


make him more agreeable at home. He was an only child,
and his widowed mother regarded him as her all in all. Very
proud was Mrs. Cleveland of his talents, very proud of his
success: with fond admiration she gazed on his open,
handsome countenance,—the high forehead, the clear gray
eye, and thought that amongst all his companions none
could compare with her son. And yet Mrs. Cleveland was by
no means altogether contented with Horace. She would
have been better pleased had he exhibited less spirit and
more submission.

Horace was eager to claim a man's independence; Mrs.


Cleveland clung to a parent's authority. It is probable that
the lady would have retained more influence over her boy,
had she exercised it more judiciously. She had been as an
unskillful rider, who, instead of keeping a light but firm hand
on the bridle, alternately threw down the rein and caught it
up to jerk the mouth of his restive steed, and irritate its
temper. Delicate health and weak nerves had combined to
make the widowed lady sometimes peevish, and even
unreasonable: and her will often clashed with that of her
son to a degree that caused a painful jar upon the feelings
of both. Thus those who were dearer to each other than all
the world besides, were each not unfrequently a source of
annoyance and irritability even to the being best beloved.

"I am sure that it was great folly to come to Calabria at


all!" exclaimed Mrs. Cleveland, as the chaise drew up at the
door of the inn.

Now this was what Horace could not endure to hear,


since it had been to gratify his wishes, and quite against her
own judgment, that his mother had quitted Naples for the
mountainous south of Italy. Moreover Horace had heard
that same exclamation nearly ten times already on that day,
and the effect of heat and weariness had drawn largely on
his stock of patience. Ready to vent his ill-humor on the
first thing that he touched, Horace flung open the door of
the chaise as he might have hit at a foe, and rudely pushed
aside a young Italian who had come forward to help the
lady to alight.

The hot blood rose to the stranger's sun-burnt cheek,


and a look of anger, instantly repressed, passed like
lightning over his face.

Mrs. Cleveland caught the look, transient as it was, and


as she walked into the inn, laid her hand on the arm of her
son, and whispered to him in English:

"For mercy's sake, do not treat these people with


rudeness. You know that all these Italians carry stilettos in
their vests; we are alone—amongst strangers!"

Horace's only reply was a look to express contempt for


all Italians in general, and this one in particular, and a
disregard for all considerations founded upon personal fear.
He snatched up a grip, and one or two shawls from the
chaise, and carried them into the locanda, being too much
out of humor to offer his mother the support of his arm.

Mrs. Cleveland was shown into the little inn by its


master, who came forth to meet her. He was a stout, red-
faced man with one eye, and a countenance by no means
prepossessing.

"Giuseppina! Giuseppina!" he shouted.


A Calabrese girl, barefooted, attired in a bright blue
dress with an orange border, and wearing large gold ear-
rings and chain, came to answer the call. Guided by her, the
weary lady entered a small, close room which might be
termed the parlor, but which was evidently put to many
more uses.

The entrance of the visitors disturbed a hen and a whole


brood of sickly chickens, which cackling and fluttering made
a hasty retreat across the threshold. On one part of the
dirty earthen floor was piled a set of empty wine-skins, the
odor from which blended with the more disagreeable scent
from some thousands of silk-worm cocoons, heaped
together in a corner.

"Have you no better quarters to give us than this hole?"


cried Horace to Giuseppina in the Italian language, which he
spoke with ease.

"No, signore," replied the girl, as she swept from the


table a confused litter of old sacking, chaff and oakum, in
order to make preparation for the coming meal, which
Horace, with a look of disgust, forthwith proceeded to order.
Mrs. Cleveland, being less familiar with the language,
usually left such arrangements to her son.

"What can you give us?" asked Horace.

"Ebene, signore, maccaroni," replied the barefooted


maiden.

"Maccaroni, of course, and what besides?"

Giuseppina glanced to the right at the wine-skins, then


to the left at the heap of cocoons, as if to gather from them
some culinary idea, shrugged her shoulders and suggested
"omelet," but in a tone expressive of doubt.
"Omelet then, and anything else that you may have,
and be quick, for the lady is weary and wants refreshment!"
cried Horace.

Giuseppina showed her white teeth in a smile, and


quitted the parlor.

"One is stifled in this horrible den!" exclaimed Horace,


stalking up to the window, and throwing it open. Very little
air was admitted on that sultry afternoon, but there came
the sound of voices from without.

"What are the people doing outside, Horace?" faintly


inquired Mrs. Cleveland.

"Like Italians—doing nothing," was the reply. "They are


merely gathering round that young man whom we saw at
the door, apparently to listen to his singing, for he has a
guitar in his hand."

"That Italian whom you struck?" inquired Mrs.


Cleveland.

"I did not strike him—I only pushed him back. These
fellows must be taught to know their own place," Horace
haughtily replied.

"My dear boy," said Mrs. Cleveland, leaning forward on


the chair on which she had wearily sunk, "you must acquire,
indeed you must, a more gentle and conciliatory manner. In
a wild, strange place like this, altogether out of the bounds
of civilization, a thoughtless act might bring serious trouble
—a wanton insult might cost a life!"

Horace did not answer, and as he remained looking out


the window, his mother could not see on his face the effect
of her gentle reproof; she saw, however, that he was
impatiently moving his foot up and down, which was his
trick when he had to listen to anything which it did not
please him to hear.

A few chords on a guitar, touched by a skillful hand,


were now heard, and immediately the hum of voices
without was silenced.

"I hate to see a man play a guitar!" exclaimed Horace.


As he spoke, the tones of a voice singularly melodious and
rich mingled with those of the instrument, and Mrs.
Cleveland, weary as she felt, was lured to the window to
listen.

Surrounded by a group of Calabrese stood the musician.


He was simply but picturesquely attired, after the fashion of
his country; the red jacket, not worn, but carried across the
shoulder ready to be put on in season of rain, left exposed
to view the white shirt. A felt hat, of a somewhat oval
shape, shaded a countenance which, with its classical
outlines and thoughtful expression, could have formed a
study for an artist. The song of the young Italian, translated
into English, might run thus:—

If to pine in a dungeon were e'er my fate


When light struggled in through the iron grate,
What view would most soothe my unwearied eye,—
The boundless ocean—the earth—or sky?

Oh! not the ocean!—its ceaseless swell


With my restless grief would accord too well;
The voice of its wild waves would break my sleep,
And the captive bend o'er his chain and weep.
'Twere sweet to gaze on the laughing earth,
And view, though distant, its scenes of mirth.
Ah, no! ah, no! they would but recall
Life's flowers to one who had lost them all.

The sky, the sky, unbounded, bright,


With its silvery moon, and its stars of light,
The blush of morning, the evening glow,
Its passing clouds, and its radiant bow,—

There—there would I fix my unwearied eye,


Till fancy could paint a bright world on high,
And earth and its sorrows would fade in night,
With freedom before me—and heaven in sight!

CHAPTER II.
A SUSPICIOUS CHARACTER.

"Who is that singer?" inquired Mrs. Cleveland in broken


Italian of the girl Giuseppina, who had just reentered the
room with a large dish of maccaroni which looked like a pile
of tobacco-pipes.

"Improvisatore," answered the girl.

"What is that?" inquired Horace.


"An improvisatore," replied Mrs. Cleveland, "is one who
makes poetry on the spur of the moment. This class of
minstrels is, I believe, peculiar to Italy, the beautiful
language of the country giving facility to rapid composition.
Do you suppose," she continued, addressing herself to
Giuseppina, "that the young man really made that song
about prisons himself?"

"Prisons," repeated the Calabrese, with a slight but


expressive shrug of the shoulders; "I should say that
Raphael might very well sing about prisons."

"You don't mean us to understand," said Horace, "that,


young as he seems, he has been acquainted with the inside
of them?"

"Chi sa? (Who knows?)" replied the girl, with another


expressive shrug, as she placed his dish upon the table.

"He was never imprisoned, I trust, for any crime?"


inquired Mrs. Cleveland, more uneasy than ever at the
recollection of Horace's rudeness to the stranger.

"Chi sa?" repeated the girl.

"I cannot believe," said the lady, "that there can lurk
much harm in one with such a countenance, and such an
exquisite voice."

"Oh, he's an Italian!" cried Horace, who rather prided


himself on his prejudices.

Giuseppina lingered, fidgeting about the table, moving


the dish now to the right, now to the left, as if she could
never satisfy herself that she had placed it perfectly
straight.
"Does this Raphael, as you call him," said Horace, "earn
his living by his music?"

"Chi sa?" repeated Giuseppina, not looking up, but


showing her teeth in a meaning smile.

"Does the idle fellow do nothing but sing and play?"

"He cures the sick also," replied Giuseppina; "he


gathers herbs, and has wonderful power to take away fever,
and to heal wounds from sword or from shot. But," she
added, crossing herself, and shaking her head, "the abate
(abbot) says that none can tell how he came by his
knowledge."

"This Raphael is looked upon, then, as rather a


suspicious character?"

Giuseppina dropped her voice, and looked as if the


desire to impart information were struggling with a fear of
danger from so doing as she made answer:

"He is certainly no stranger to Matteo."

The last word was pronounced in a whisper so low, that


both Mrs. Cleveland and her son had to bend forward to
catch the name.

"Who is Matteo?" asked Horace.

Giuseppina raised her hands and eyebrows with a


gesture of surprise.

"Not know Matteo! All the world knows Matteo!" she


said with low but rapid utterance, glancing around her as
she did so, as if to make sure that no third listener was
present. "We don't speak of him—no one speaks of him—
but—"

"But?" said Horace with some curiosity, as the speaker


came to a pause.

"Oh!" continued Giuseppina, with the same stealthy look


and quick utterance. "Did not the signori hear how the
government courier was stopped and robbed of three
hundred dollars on the high road, and the Cavaliero Donato
waylaid and shot dead? It is said that they owed him a
grudge. And the Contessa Albani was attacked in her
detturino and all her jewels taken, and her servants
knocked on the head!"

"By whom—by this Matteo?" asked Horace, while his


mother, who only understood half of the girl's information,
clasped her hands with a gesture of alarm.

"Zitto! (Hush!)" whispered the talkative Calabrese, who


appeared, however, greatly to relish the diversion of
frightening an English lady. Horace looked as if he could not
be frightened.

"And does your government do nothing to keep down


such banditti?" said young Cleveland. "What are the soldiers
about?"

"I soldati! Ah!" replied Giuseppina with an expressive


nod. "There was a party of them here to-day, horsemen, on
their way to Reggio; they had a prisoner with them, arms
bound behind his back—" The girl put back her own elbows
and scowled darkly, as if acting the part of a captured
bandit.

"I hope that it was this Matteo!" cried Horace.


"Zitto! (Hush!)" again whispered the girl. "It was not
Matteo—they said it was his son."

"I suppose that the soldiers were taking him to Reggio


for trial!"

Giuseppina again nodded her head.

"And what is likely to become of him?"

The girl twisted her finger in the chain which she wore,
tightening it round her neck, but only answered with a
shrug, "Chi sa?" And quitted the room to bring in the rest of
the dinner.

"Horace! What a dreadful place we have come to!"


gasped Mrs. Cleveland.

The youth laughed as he seated himself at the table. "It


is clear that one has some chance of an adventure in
Calabria," said he.

"Keep me from adventures!" exclaimed the lady. "Did


not the girl tell us—I could hardly understand her, for she
spoke so fast—of people being robbed and murdered on the
high road by banditti?"

"Ah! But the soldiers are wide awake," suggested


Horace, helping the maccaroni. "I hope that they—" (he was
not now speaking of the military) "will bring us something
better worth eating than this!"

Giuseppina pushed the door open with her knee, and


reentered, a dish of omelet in one hand, a second full of
snow in the other, and a bottle of wine under her arm.
"Where will the soldiers be to-night?" asked Mrs.
Cleveland with some anxiety. "I wish that we had asked for
an escort."

"They'll be at Staiti, no doubt," answered Giuseppina,


setting down the viands which she had brought.

"We'll be at Staiti to-night also," said Horace; adding in


English, "so, mother, you need fear nothing."

"Staiti to-night! No, it would be dark ere the signori


could arrive there," observed Giuseppina; "The signori can
have good beds here."

"Here!" exclaimed Horace, looking around him in


disgust. "The place is not fit for a hound!"

"But, my dear child," said Mrs. Cleveland, "safety is to


be thought of even before comfort."

Horace replied to his mother, like herself speaking in


English, which Giuseppina, unnecessarily loitering by the
table, tried to understand with her eyes, as it conveyed no
meaning to her ears: "You talk of safety as if this place
were safe. Have you not just heard that one of the gang of
banditti is below—a fellow let loose from a prison?"

"The improvisatore?" said Mrs. Cleveland. "I did not


understand that he was actually one of the band."

"But I did," pursued Horace, in his overbearing manner;


"and I saw the master of this very house, who, by the way,
looks a ruffian if ever there was one, in close conference
with this very Raphael, who has doubtless come here for no
good."
Mrs. Cleveland pushed away the plate of untasted food
before her, nervous anxiety having taken from the weary
lady all inclination to eat. Horace, to whom a little danger
was rather a pleasant excitement, had already half
demolished the omelet.

"The signora is not well, the signora must not travel


further to-day," suggested Giuseppina.

Horace glanced up hastily at his mother; but seeing on


her anxious countenance nothing to excite his fears for her
health, he impatiently motioned to the girl to quit the room,
as he felt more at his ease when her black eyes were not
watching his lips, Giuseppina with lingering step withdrew.

"I wish that you would eat, mother; you know that you
will be quite exhausted, if you don't," cried Horace in a tone
of vexation.

"I can't travel in the dark—I can't go to be waylaid—


robbed—perhaps—"

"Don't you see," cried Horace, striking the handle of his


spoon on the table to give more force to his argument,
"that if we stay here we are just as likely to come to grief?
Have you never heard or read of horrid little wayside inns
kept by robbers in disguise; of beds contrived to fall down
upon travelers and crush them; of stealthy footsteps at
night—and all that sort of thing? Now this seems to be
exactly the place for such an unpleasant adventure."

"Oh, why did we ever come to Calabria?" exclaimed


Mrs. Cleveland, sinking back in her chair.

Horace felt some self-reproach for thus adding to the


terrors of his mother. He hastily finished his omelet, and
said in a more reassuring voice—
"You see, mother dear, if we once get to Staiti, we'll be
under the wing of the law: you can travel with a military
escort like a queen."

"But it is the journey to Staiti—"

"Never fear that, it will soon be over; anything is better


than stopping here."

Horace presently pushed back his chair, and, rising from


the table, said to Mrs. Cleveland, "I'm going to order
Jacomo to put to the horses; the sooner we're off, the
better;" and without waiting to hear his mother's
objections, the youth hastily left the apartment.

"Willful, unmanageable boy!" murmured the lady to


herself. "He thinks that he knows better than every one
else, and I feel too much exhausted and worn out to oppose
him. The charge of such an ungovernable child is too much
for a poor widow like me. I should never have yielded to his
entreaties, and come to this horrible, desolate place. If I
once find myself again in a civilized land, once again know
the comforts of a home, nothing on earth shall persuade me
to go a second time upon a wild expedition such as this."

CHAPTER III.
BITTER WORDS.
Horace found Jacomo the driver seated outside the door
of the inn, enjoying al fresco (in the open air) a large
plateful of maccaroni. As Horace came towards him, the
man looked a thoroughly characteristic specimen of his
nation—half supporting himself on his elbow, while his head
was thrown back to enable him with more convenience to
drop into his mouth some six inches length of the white
moist tube, to which he was helping himself with his
fingers!

"Jacomo, put in the horses at once: we must make good


speed to reach Staiti to-night," said Horace.

The Italian stared at the speaker with a look of surprise


and dissatisfaction. "The signor forgets that the day is
advanced, the way mountainous, the horses tired, the
signora faint, and the roads not safe after dark," said the
man; "it would be no wise act to start before morning."

"That is for me to decide, and not for you," said the


young Englishman with hauteur.

"You can have excellent accommodation here—good


beds, good fare—what more can the signori require?" said
the one-eyed host, pointing towards the inn with a peculiar
and stealthy expression in his disagreeable face, which
confirmed Horace in his resolution to depart.

"Jacomo, harness the horses, and directly!" he


exclaimed. "If there be any delay, not an extra carlino (a
small coin) shall you have at the end of the Journey."

The driver, with an exclamation directed to his patron


saint and some mutterings which Horace did not
understand, began making preparations to obey, moving his
lazy limbs more leisurely than suited the impatience of his
employer. The host, shrugging his shoulders, went into the
inn. As Horace was about to follow him thither, the
improvisatore, who had been standing under the shadow of
a neighboring tree unperceived by the youth, came forward
and crossed over between him and the door, not looking at
Horace, nor appearing to observe him, but as he passed
close in front of him, dropping the words "Do not go," in a
low but earnest tone.

Horace glanced in surprise after the speaker; startled by


so strange a warning from the last person whom he should
have expected to give one. He would have liked to have
questioned Raphael, but the improvisatore had already
disappeared.

"I wonder if it be wise to start," thought Horace, whose


resolution for the first time began to waver; "yet I have no
reason to trust this stranger, who seems to bear an evil
character, even amongst the people of this place."

"The signor has changed his mind?" inquired Jacomo


with a grin—the man having probably detected a look of
indecision upon the face of young Cleveland.

This way of putting the question fixed the determination


of Horace, who secretly prided himself upon what he
thought strength and decision of character. "I never change
my mind," he said haughtily; "I shall be ready to start in
ten minutes. Let me then find the carriage at the door, or
you shall have reason to repent of the delay."

In about a quarter of an hour the vehicle stood ready in


front of the inn. The one-eyed man, who seemed to
combine in himself the offices of landlord and ostler, was
there to see his guests depart. Giuseppina was at the door,
and about half-a-dozen barefooted brown urchins, crowded
together like bees to view the strangers enter the carriage,
as they had stared a few hours before at the soldiers
bearing the bandit away. Raphael stood with folded arms
near the heads of the horses. He exchanged words with no
one, nor seemed to take notice of the whispered remarks of
the children who glanced at him ever and anon.

"The soldiers had him once," said one boy, pointing to


the improvisatore; "did they tie his arms behind him? I
wonder whether he has the marks on his wrists."

"How did he get away? Did Matteo break his prison, and
set him free?"

"Perhaps the soldiers let him off because he sings so


fine!" suggested one black-eyed little damsel, with
uncombed hair falling in dark masses on each side of her
merry brown face.

"I like Raphael; he cured my bad leg, and he speaks so


kind," said another.

"But he's a bad man, I know he's a bad man,"


whispered a thin, sallow child with a solemn look, "he does
not bow to the Madonna, nor touch the holy water."

"He does!" exclaimed the former speaker, indignant at


so dark an imputation being thrown on his benefactor.

"But he does not," persisted the sallow child; "I've


watched him again and again; he never bows to the holy
image, nor crosses himself; and I don't believe that he tells
his beads, or ever goes to confess. Mother says that he's a
wicked man, and prays to none of the saints."

The faintest approach to a smile on the lips of the


young Italian alone betrayed that he heard any part of the
conversation of which he was the subject.
The attention of the children was now diverted to the
travelers who were leaving the inn. "How pale the signora
is! Does she not look anxious and frightened?" were the
whispers exchanged among the group.

Uneasy and irresolute Mrs. Cleveland certainly was.


Horace, who, however faulty in other respects, never
concealed anything from his mother, had told her of the
warning of Raphael; and as he led her to the carriage,
lingering and reluctant, he was warmly combating the idea
that the Italian's words should have the slightest effect in
influencing their movements.

"Doubtless he is playing into the hands of this Matteo,


of whose atrocities we have been hearing, and who will be
as savage as a bear at the capture of his son. Common
sense tells us that we should put no faith in this stranger; a
low musician, a jailbird, a companion of thieves!"

These words were uttered aloud, of course in the


English language, but as Mrs. Cleveland glanced at the
improvisatore to judge by his face whether he merited the
epithets given him, she again saw a sudden flush tinge the
paleness of his cheek. Raphael stepped forward, as if to
help her into the carriage, for her foot was already on the
step, and again in low tones breathed the words "Do not
go," but this time in English, though with an accent quite
Italian.

Mrs. Cleveland started, and would have drawn back; but


Horace at that moment almost lifted her into the carriage,
and sprang in after her with a quickness which gave his
nervous mother hardly time to think or to breathe.

"Horace—I can't go—I won't go—stop the driver—we


will get out!" gasped the lady.
"Mother, it is nonsense; you will make us the laughing-
stock of the place!" exclaimed Horace, who had caught sight
of a leer upon the face of the one-eyed man, which had
strengthened his suspicions as to the character of the low
little inn in the mountains.

The driver cracked his whip, and the jingle of the


horses' bells was heard as they moved forward on the
white, dusty road.

The conscience of Horace smote him a little for the


rudeness of his manner and words. "You know, mother," he
said, in a softer tone, "that I must care for your comfort
and safety."

"Comfort!" exclaimed Mrs. Cleveland with indignation.


"Willful, ungrateful boy that you are, you never care for
anything but your own selfish fancies!" And exhausted in
strength, and wounded in feeling, the irritated mother burst
into a flood of tears.

"Mother, I can't stand this!" exclaimed Horace, in


extreme vexation at seeing her weep.

"You have planted many a thorn in my pillow," sobbed


the lady; "you may find them one day on your own!"

Horace could not answer. His heart seemed to be rising


into his throat. He pulled his cap low over his eyes, and
leaned back in the corner of the carriage, wishing, with all
his soul, that he had never come on the journey. He had
been accustomed to chidings and reproaches, but not to
tears, and each drop seemed to fall upon his heart like a
drop of molten lead.

Horace had never but once before seen his parent weep
upon his account, and the occasion which drew forth those
tears was one of the most tender recollections of his
childhood. Horace remembered the time when he had lain
in his little cot, parched by fever, and when awakening
again and again in the long, wretched nights, he had ever
seen, by the dim light of the shaded candle, the form of his
mother, ready to offer the cooling drink to relieve his
burning thirst. He remembered how, as long as his danger
continued, her calm courage had never failed her, faith and
love supporting her through sleepless nights and miserable
days; but that when the doctor had said at last, "The crisis
is over, he will do well," her over-strained feelings had at
length given way, and she had wept tears of thankful
delight over the child who lay on her bosom!

How different from those glad tears were the drops


which the wounded, disappointed parent was shedding now!
A painful sensation came over Horace as the doubt
suggested itself to his mind whether his mother would have
felt such transport at his recovery had she known all that
his petulance would cost her; nay, Horace was not certain
whether, on the whole, her only and much-loved son had
not given her more pain than pleasure. It was too true that
he had thought more of his own selfish fancies than of the
wishes of his tender parent; that he had often treated her
with disrespect, and even with actual disobedience.

Horace's conscience told him that he had not honored


his mother, nor made her happy; and he was so painfully
stung by its reproaches that he was half inclined to call out
to the driver to go back to the inn, as a kind of practical
way of showing his parent that he regretted having
preferred his own opinion to hers.

But the carriage was now plunging down a road so


steep and narrow, that it we have been almost impossible
to stop it, and quite impossible to turn. The utmost
attention of the driver was required to keep his horses on
their legs, and every now and then a tremendous jolt made
Mrs. Cleveland grasp the side of the vehicle to prevent
herself from being jerked out of her seat. She had ceased
crying, but she was thoroughly displeased with her son, and
was not disposed to address him again, even if the
roughness of the road had not rendered it difficult to speak.

Horace knew that he ought to ask his mother's


forgiveness at once, as he had often done when a child; but
pride shrank from that simple course. As a compromise
between conscience and pride, he said, with a little
hesitation:

"I am sorry that I spoke so unguardedly about that


mysterious Italian; though who could have dreamed of any
one here comprehending the English tongue?"

Mrs. Cleveland made no reply, but continued gazing out


of the carriage window in an opposite direction.

"And I am sorry," continued Horace with an effort, "that


I said or did anything to vex you."

Still silence—still the averted face. This had not been


the first, no, nor the fiftieth time that Horace had offended
his mother, and such offences, though apparently trivial,—

"Make up in number what they lack in weight."

Constant friction produces on the mind the same effect


that it does on the body—a rankling sore, more painful than
the result of one sharp blow. A few affectionate words, a
filial embrace, had often seemed sufficient reparation for an
ebullition of hasty temper; love readily forgets and forgives;

You might also like